Re: [PATCH 1/2] mkfs: ignore data blockdev stripe geometry for small filesystems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> ---
>  mkfs/xfs_mkfs.c |   14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index a5e2df76..68d6bd18 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -2583,6 +2583,20 @@ _("%s: Volume reports invalid stripe unit (%d) and stripe width (%d), ignoring.\
>  				progname, BBTOB(ft->dsunit), BBTOB(ft->dswidth));
>  			ft->dsunit = 0;
>  			ft->dswidth = 0;
> +		} else if (cfg->dblocks < GIGABYTES(1, cfg->blocklog)) {
> +			/*
> +			 * Don't use automatic stripe detection if the device
> +			 * size is less than 1GB because the performance gains
> +			 * on such a small system are not worth the risk that
> +			 * we'll end up with an undersized log.
> +			 */
> +			if (ft->dsunit || ft->dswidth)
> +				fprintf(stderr,
> +_("%s: small data volume, ignoring data volume stripe unit %d and stripe width %d\n"),
> +						progname, ft->dsunit,
> +						ft->dswidth);
> +			ft->dsunit = 0;
> +			ft->dswidth = 0;
>  		} else {
>  			dsunit = ft->dsunit;
>  			dswidth = ft->dswidth;
> 

Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>

-- 
Carlos Maiolino



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux