]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/xfs: Add helper to check if nrext64 option is supported
authorChandan Babu R <chandan.babu@oracle.com>
Sat, 11 Jun 2022 11:10:35 +0000 (16:40 +0530)
committerZorro Lang <zlang@kernel.org>
Sun, 12 Jun 2022 10:10:23 +0000 (18:10 +0800)
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>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/xfs

index 2123a4ab428195a34caba1a2d45574b5c5276bf0..9f84dffb8d2acf188ee05f68fdcce3741be6b889 100644 (file)
@@ -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()
 {