All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/1] mkfs: complain about impossible log size constraints
Date: Thu, 4 Aug 2022 21:23:33 -0500	[thread overview]
Message-ID: <c633f5fc-1c19-7622-4759-fd5d916f92f6@sandeen.net> (raw)
In-Reply-To: <165826709473.3268805.14134746462173901488.stgit@magnolia>

On 7/19/22 4:44 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> 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@kernel.org>

Thanks for the update.

Reviewed-by : Eric Sandeen <sandeen@redhat.com>

> ---
>  mkfs/xfs_mkfs.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index b140b815..a5e2df76 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -3413,6 +3413,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, filesystem is too small\n"),
> +				max_logblocks,
> +				min_logblocks);
> +		usage();
> +	}
>  
>  	/* internal log - if no size specified, calculate automatically */
>  	if (!cfg->logblocks) {
> 

  reply	other threads:[~2022-08-05  2:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 21:44 [PATCHSET v2 0/1] xfsprogs: random fixes for 5.19 Darrick J. Wong
2022-07-19 21:44 ` [PATCH 1/1] mkfs: complain about impossible log size constraints Darrick J. Wong
2022-08-05  2:23   ` Eric Sandeen [this message]
2022-07-21 16:41 ` [PATCH 2/1] libxfs: stop overriding MAP_SYNC in publicly exported header files Darrick J. Wong
2022-08-05  2:40 ` [PATCH 3/1] xfs_repair: fix printf format specifiers on 32-bit platforms Darrick J. Wong
2022-08-05  2:41 ` [PATCH 4/1] xfs_repair: retain superblock buffer to avoid write hook deadlock Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c633f5fc-1c19-7622-4759-fd5d916f92f6@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.