Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@kernel.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests@vger.kernel.org, hch@lst.de, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs/21[67]: fix mkfs log concurrency detection
Date: Tue, 30 Jun 2026 01:53:38 +0800	[thread overview]
Message-ID: <akKvzArcNLWKCACL@zlang-mailbox> (raw)
In-Reply-To: <178240619668.1665857.17134786745403757824.stgit@frogsfrogsfrogs>

On Thu, Jun 25, 2026 at 09:51:17AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Both of these tests use _scratch_mkfs_xfs_supports_concurrency to detect
> if they should be adding -lconcurrency=0 to the mkfs options that are
> used to format a loop device.
> 
> However, this doesn't work in practice because of three factors: 1) the
> scratch device could have an external log set up; 2) the loop device
> does /not/ have an external log device; and 3) -lconcurrency isn't
> compatible with -llogdev.
> 
> Fix this by creating a more general mkfs option detection helper and use
> that once we have the loop device set up.
> 
> Cc: <fstests@vger.kernel.org> # v2026.05.17
> Fixes: ffc8bad17e5b2f ("xfs/21{6,7} Use default -l concurrency=0 on mkfs.xfs that supports it")
> Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
> ---
>  common/xfs    |    6 ++++++
>  tests/xfs/216 |    9 ++++-----
>  tests/xfs/217 |    9 ++++-----
>  3 files changed, 14 insertions(+), 10 deletions(-)
> 
> 
> diff --git a/common/xfs b/common/xfs
> index 88299acdd086be..81add2086866c8 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -64,6 +64,12 @@ _scratch_mkfs_xfs_opts()
>  	echo "$MKFS_XFS_PROG $SCRATCH_OPTIONS $mkfs_opts"
>  }
>  
> +# Figure out if the supplied mkfs.xfs options are supported.  A device or file
> +# path must be specified as one of the options, though it will not be written.
> +_mkfs_xfs_supported()
> +{
> +	$MKFS_XFS_PROG -f -N "$@"
> +}
>  
>  _scratch_mkfs_xfs_supported()
>  {
> diff --git a/tests/xfs/216 b/tests/xfs/216
> index 1749647c11f716..48657242e65daf 100755
> --- a/tests/xfs/216
> +++ b/tests/xfs/216
> @@ -22,11 +22,6 @@ _cleanup()
>  
>  _require_scratch
>  _scratch_mkfs_xfs >/dev/null 2>&1
> -if _scratch_mkfs_xfs_supports_concurrency -l >> $seqres.full 2>&1; then
> -	loop_mkfs_opts="-l concurrency=0"
> -else
> -	loop_mkfs_opts=""
> -fi
>  _scratch_mount
>  
>  _require_loop
> @@ -76,6 +71,10 @@ mkdir $LOOP_MNT
>  
>  loop_dev=$(_create_loop_device $LOOP_IMG)
>  
> +if _mkfs_xfs_supported $loop_mkfs_opts -l concurrency=0 $loop_dev &>> $seqres.full; then
> +	loop_mkfs_opts="$loop_mkfs_opts -l concurrency=0"

Hi Darrick,

This patch conflicts with Christoph's patch:
https://lore.kernel.org/fstests/20260618134834.237647-3-hch@lst.de/

I've merged that patch into patches-in-queue branch, if you don't have
objections to that change, could you rebase on latest patches-in-queue
and send this patch again with Christoph's RVB :)

Thanks,
Zorro

> +fi
> +
>  # walk over standard sizes (up to 256GB)
>  _do_mkfs 1 2 4 8 16 32 64 128 256
>  
> diff --git a/tests/xfs/217 b/tests/xfs/217
> index 23aae842d1fb61..34ac8dae8ef43f 100755
> --- a/tests/xfs/217
> +++ b/tests/xfs/217
> @@ -21,11 +21,6 @@ _cleanup()
>  
>  _require_scratch
>  _scratch_mkfs_xfs >/dev/null 2>&1
> -if _scratch_mkfs_xfs_supports_concurrency -l >> $seqres.full 2>&1; then
> -	loop_mkfs_opts="-l concurrency=0 -d concurrency=0"
> -else
> -	loop_mkfs_opts=""
> -fi
>  _scratch_mount
>  # 16T mkfs requires a bit over 2G free
>  _require_fs_space $SCRATCH_MNT 2202000
> @@ -63,6 +58,10 @@ fi
>  
>  loop_dev=$(_create_loop_device $LOOP_IMG)
>  
> +if _mkfs_xfs_supported $loop_mkfs_opts -l concurrency=0 -d concurrency=0 $loop_dev &>> $seqres.full; then
> +	loop_mkfs_opts="$loop_mkfs_opts -l concurrency=0 -d concurrency=0"
> +fi
> +
>  #
>  # walk over "new" sizes supported by recent xfsprogs.
>  # Note that the last test is for 16TB-1GB as 32bit platforms only support
> 

  parent reply	other threads:[~2026-06-29 17:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 16:50 [PATCHSET] fstests: more random fixes for v2026.06.21 Darrick J. Wong
2026-06-25 16:51 ` [PATCH 1/2] common/xfs: fix _scratch_mkfs_xfs_supports_concurrency Darrick J. Wong
2026-06-26  4:52   ` Christoph Hellwig
2026-06-25 16:51 ` [PATCH 2/2] xfs/21[67]: fix mkfs log concurrency detection Darrick J. Wong
2026-06-26  4:52   ` Christoph Hellwig
2026-06-29 17:53   ` Zorro Lang [this message]
2026-06-29 18:07     ` Zorro Lang
  -- strict thread matches above, loose matches on Subject: below --
2026-05-20 18:52 [PATCH 1/2] common/xfs: fix _scratch_mkfs_xfs_supports_concurrency Darrick J. Wong
2026-05-20 19:01 ` [PATCH 2/2] xfs/21[67]: fix mkfs log concurrency detection Darrick J. Wong
2026-05-25  5:46   ` Christoph Hellwig
2026-05-29  4:21     ` Darrick J. Wong
2026-05-29  5:45       ` Christoph Hellwig
2026-05-29  9:43   ` Zorro Lang

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=akKvzArcNLWKCACL@zlang-mailbox \
    --to=zlang@kernel.org \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hch@lst.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox