FS/XFS testing framework
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Lukas Herbolt <lukas@herbolt.com>
Cc: zlang@kernel.org, fstests@vger.kernel.org
Subject: Re: [PATCH 2/4] common/xfs: helper function to check if -l/-d/-r concurrecy flags.
Date: Thu, 30 Apr 2026 09:39:54 -0700	[thread overview]
Message-ID: <20260430163954.GT7739@frogsfrogsfrogs> (raw)
In-Reply-To: <20260430131317.693845-6-lukas@herbolt.com>

On Thu, Apr 30, 2026 at 03:13:18PM +0200, Lukas Herbolt wrote:
> Check if the requested flag is supported by the mkfs.xfs on scratch
> device.
> 
> Signed-off-by: Lukas Herbolt <lukas@herbolt.com>
> ---
>  common/xfs | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/common/xfs b/common/xfs
> index f7a6d2f2f03a..12cf6c273c53 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -2399,3 +2399,9 @@ _require_xfs_healer()
>  	_xfs_healer --supported "$@" &>/dev/null || \
>  		_notrun "health monitoring not supported on this kernel"
>  }
> +
> +# Check if -l/-d/-r concurrency is supported.
> +_scratch_mkfs_supports_concurrency()

This is specific to xfs, so I think the name should reflect that.

_scratch_mkfs_xfs_supports_concurrency

> +{
> +        _scratch_mkfs_xfs_supported $1 concurrency=0
> +}

As I noted downthread, -d and -l gained their concurrency= options in
the same release so we probably ought to do future fstests authors a
favor and note that in the comments or just do something dorky like:

_scratch_mkfs_xfs_supports_concurrency()
{
	local arg="${1:-d}"

	# -d and -l gained concurrency options at the same time
	test "$arg" = "-l" && arg="-d"

	_scratch_mkfs_xfs_supported "$arg" concurrency=0
}

--D

> -- 
> 2.53.0
> 
> 

  reply	other threads:[~2026-04-30 16:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 13:13 [PATCH 0/4] Fixes for mkfs.xfs with high amount of CPUs and SSDs Lukas Herbolt
2026-04-30 13:13 ` [PATCH 1/4] common/rc: Add helper to calculate percetage of free space available Lukas Herbolt
2026-04-30 16:42   ` Darrick J. Wong
2026-04-30 13:13 ` [PATCH 2/4] common/xfs: helper function to check if -l/-d/-r concurrecy flags Lukas Herbolt
2026-04-30 16:39   ` Darrick J. Wong [this message]
2026-04-30 13:13 ` [PATCH 3/4] generic/{102,172,347}: Adapt test for XFS on systems with 128+CPUs + SSDs Lukas Herbolt
2026-04-30 16:31   ` Darrick J. Wong
2026-04-30 13:13 ` [PATCH 4/4] xfs/216 xfs/217 Use default -l conccurency=0 on mkfs.xfs that supports it Lukas Herbolt
2026-04-30 16:36   ` Darrick J. Wong
2026-05-14  8:11     ` Lukas Herbolt

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=20260430163954.GT7739@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=lukas@herbolt.com \
    --cc=zlang@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