Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Chandan Babu R <chandan.babu@oracle.com>
To: fstests@vger.kernel.org
Cc: Chandan Babu R <chandan.babu@oracle.com>,
	zlang@kernel.org, david@fromorbit.com, djwong@kernel.org,
	linux-xfs@vger.kernel.org
Subject: [PATCH V3 2/4] common/xfs: Add helper to check if nrext64 option is supported
Date: Sat, 11 Jun 2022 16:40:35 +0530	[thread overview]
Message-ID: <20220611111037.433134-3-chandan.babu@oracle.com> (raw)
In-Reply-To: <20220611111037.433134-1-chandan.babu@oracle.com>

This commit adds a new helper to allow tests to check if xfsprogs and xfs
kernel module support nrext64 option.

Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
---
 common/xfs | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/common/xfs b/common/xfs
index 2123a4ab..9f84dffb 100644
--- a/common/xfs
+++ b/common/xfs
@@ -444,6 +444,18 @@ _require_xfs_sparse_inodes()
 	_scratch_unmount
 }
 
+# this test requires the xfs large extent counter feature
+#
+_require_xfs_nrext64()
+{
+	_scratch_mkfs_xfs_supported -m crc=1 -i nrext64 > /dev/null 2>&1 \
+		|| _notrun "mkfs.xfs does not support nrext64"
+	_scratch_mkfs_xfs -m crc=1 -i nrext64 > /dev/null 2>&1
+	_try_scratch_mount >/dev/null 2>&1 \
+		|| _notrun "kernel does not support nrext64"
+	_scratch_unmount
+}
+
 # check that xfs_db supports a specific command
 _require_xfs_db_command()
 {
-- 
2.35.1


  parent reply	other threads:[~2022-06-11 11:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-11 11:10 [PATCH V3 0/4] Large extent counters tests Chandan Babu R
2022-06-11 11:10 ` [PATCH V3 1/4] xfs/270: Fix ro mount failure when nrext64 option is enabled Chandan Babu R
2022-06-22 17:03   ` Darrick J. Wong
2022-06-11 11:10 ` Chandan Babu R [this message]
2022-06-11 11:10 ` [PATCH V3 3/4] xfs: Verify that the correct inode extent counters are updated with/without nrext64 Chandan Babu R
2022-06-11 11:10 ` [PATCH V3 4/4] xfs: Verify correctness of upgrading an fs to support large extent counters Chandan Babu R
2022-06-22 17:02 ` [PATCH V3 0/4] Large extent counters tests 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=20220611111037.433134-3-chandan.babu@oracle.com \
    --to=chandan.babu@oracle.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --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