Re: [PATCH 2/4] common/xfs: helper function to check if -l/-d/-r concurrecy flags.

"Darrick J. Wong" <[email protected]>
Newsgroups org.kernel.vger.fstests
Message-ID <20260430163954.GT7739@frogsfrogsfrogs>
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 <[email protected]>
> ---
>  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
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.