All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.com>
Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-xfs@vger.kernel.org, ritesh.list@gmail.com,
	ojaswin@linux.ibm.com, djwong@kernel.org, zlang@kernel.org
Subject: Re: [PATCH v1 2/3] common/xfs: Add a new helper function to check v5 XFS
Date: Thu, 13 Feb 2025 08:23:32 +1100	[thread overview]
Message-ID: <Z60RVLPGwpucOgRx@dread.disaster.area> (raw)
In-Reply-To: <61a7e3f25621548ec3ef795a3cd0724e32afb647.1739363803.git.nirjhar.roy.lists@gmail.com>

On Wed, Feb 12, 2025 at 12:39:57PM +0000, Nirjhar Roy (IBM) wrote:
> This commit adds a new helper to function to check that we can
> create a V5 XFS filesystem in the scratch device
> 
> Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
> ---
>  common/xfs | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/common/xfs b/common/xfs
> index 0417a40a..cc0a62e4 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -468,6 +468,19 @@ _require_scratch_xfs_crc()
>  	_scratch_unmount
>  }
>  
> +# this test requires the xfs kernel support crc feature on scratch device
> +#
> +_require_scratch_xfs_v5()
> +{
> +	_require_scratch_xfs_crc
> +	_scratch_mkfs_xfs -m crc=1 > $seqres.full 2>&1 ||
> +		_notrun "v5 filesystem isn't supported by the kernel"

This is testing mkfs.xfs, not the kernel.

We already have a helper for that: _scratch_mkfs_xfs_supported()

> +	_try_scratch_mount >/dev/null 2>&1
> +	ret="$?"
> +	_scratch_unmount
> +	[[ "$ret" != "0" ]] && _notrun "couldn't mount a V5 xfs filesystem"
> +}

This doesn't actually check that the mounted filesystem is a v5
format filesystem. That's what _require_scratch_xfs_crc() does.

Hence I don't see what this adds over _require_scratch_xfs_crc(),
which does the right thing on any mkfs.xfs released in the past
decade (i.e. when we changed mkfs.xfs to create v5 filesystems by
default). 

What test environment doesn't _require_scratch_xfs_crc() work for?

-Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2025-02-12 21:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 12:39 [PATCH v1 0/3] Add mount and remount related tests Nirjhar Roy (IBM)
2025-02-12 12:39 ` [PATCH v1 1/3] xfs/539: Skip noattr2 remount option on v5 filesystems Nirjhar Roy (IBM)
2025-02-12 21:01   ` Dave Chinner
2025-02-13 10:08     ` Nirjhar Roy (IBM)
2025-02-24  4:50     ` Nirjhar Roy (IBM)
2025-02-12 21:06   ` Darrick J. Wong
2025-02-12 12:39 ` [PATCH v1 2/3] common/xfs: Add a new helper function to check v5 XFS Nirjhar Roy (IBM)
2025-02-12 21:23   ` Dave Chinner [this message]
2025-02-12 12:39 ` [PATCH v1 3/3] xfs: Add a testcase to check remount with noattr2 on a v5 xfs Nirjhar Roy (IBM)
2025-02-12 21:47   ` Dave Chinner
2025-02-13 10:00     ` Nirjhar Roy (IBM)
2025-02-13 21:49       ` Dave Chinner
2025-02-17  4:48         ` Nirjhar Roy (IBM)
2025-02-17 22:29           ` Dave Chinner
2025-02-19 15:04             ` Nirjhar Roy (IBM)

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=Z60RVLPGwpucOgRx@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=nirjhar.roy.lists@gmail.com \
    --cc=ojaswin@linux.ibm.com \
    --cc=ritesh.list@gmail.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 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.