Re: [PATCH 3/4] mkfs: complain about impossible log size constraints

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

 



On 7/12/22 8:09 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> xfs/042 trips over an impossible fs geometry when nrext64 is enabled.
> The minimum log size calculation comes out to 4287 blocks, but the mkfs
> parameters specify an AG size of 4096 blocks.  This eventually causes
> mkfs to complain that the autoselected log size doesn't meet the minimum
> size, but we could be a little more explicit in pointing out that the
> two size constraints make for an impossible geometry.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  mkfs/xfs_mkfs.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index db322b3a..61ac1a4a 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -3401,6 +3401,13 @@ _("external log device size %lld blocks too small, must be at least %lld blocks\
>  	 * an AG.
>  	 */
>  	max_logblocks = libxfs_alloc_ag_max_usable(mp) - 1;
> +	if (max_logblocks < min_logblocks) {
> +		fprintf(stderr,
> +_("max log size %d smaller than min log size %d\n"),

And when the user sees this, they will know that they should ___________ ?

> +				max_logblocks,
> +				min_logblocks);
> +		usage();
> +	}
>  
>  	/* internal log - if no size specified, calculate automatically */
>  	if (!cfg->logblocks) {
> 



[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