$XFS_IO_PROG -c 'statfs' "$1" | \
awk '{g[$1] = $3} END {print (g["geom.bsize"] * g["geom.datablocks"] / 1024)}'
}
+
+# check if mkfs and the kernel support nocrc (v4) file systems
+_require_xfs_nocrc()
+{
+ _scratch_mkfs_xfs -m crc=0 > /dev/null 2>&1 || \
+ _notrun "v4 file systems not supported"
+ _try_scratch_mount > /dev/null 2>&1 || \
+ _notrun "v4 file systems not supported"
+ _scratch_unmount
+}
_supported_fs xfs
_require_scratch_nocheck
_require_no_large_scratch_dev
+_require_xfs_nocrc
_scratch_mkfs_xfs -m crc=0 -d size=128m >> $seqres.full 2>&1 || _fail "mkfs failed"
_supported_fs xfs
_require_scratch
_require_v2log
+_require_xfs_nocrc
if [ "$(blockdev --getss $SCRATCH_DEV)" != "512" ]; then
_notrun "need 512b sector size"
_require_scratch
_require_xfs_quota
+_require_xfs_nocrc
function option_string()
{
# we intentionally corrupt the filesystem, so don't check it after the test
_require_scratch_nocheck
+_require_xfs_nocrc
# on success, we'll get a shutdown filesystem with a really noisy log message
# due to transaction cancellation. Hence we don't want to check dmesg here.
_supported_fs xfs
_require_test
_require_attrs
+_require_xfs_nocrc
+
_disable_dmesg_check
imgfile=$TEST_DIR/img-$seq
rm -f $imgfile $imgfile.old
# Format image file w/o crcs so we can sed the image file
+#
+# TODO: It might be possible to rewrite this using proper xfs_db
+# fs manipulation commands that would work with CRCs.
+#
# We need to use 512 byte inodes to ensure the attr forks remain in short form
# even when security xattrs are present so we are always doing name matches on
# lookup and not name hash compares as leaf/node forms will do.
# real QA test starts here
_require_scratch
+
+#
+# This currently forces nocrc because only that can support 512 byte block size
+# and thus block size = 1/8 page size on 4k page size systems.
+# In theory we could run it on systems with larger page size with CRCs, or hope
+# that large folios would trigger the same issue.
+# But for now that is left as an exercise for the reader.
+#
+_require_xfs_nocrc
+
_scratch_mkfs_xfs >/dev/null 2>&1
# For this test we use block size = 1/8 page size
_supported_fs xfs
_require_scratch
+_require_xfs_nocrc
# clear any mkfs options so that we can directly specify the options we need to
# be able to test the features bitmask behaviour correctly.
. ./common/filter
_require_scratch
+_require_xfs_nocrc
# real QA test starts here
_require_scratch_nocheck
_require_xfs_mkfs_cfgfile
+# Currently the only conflicting options are v4 specific
+_require_xfs_nocrc
+
cfgfile=$TEST_DIR/a
rm -rf $cfgfile
_require_scratch_xfs_inobtcount
_require_command "$XFS_ADMIN_PROG" "xfs_admin"
_require_xfs_repair_upgrade inobtcount
+_require_xfs_nocrc
# Make sure we can't upgrade to inobt on a V4 filesystem
_scratch_mkfs -m crc=0,inobtcount=0,finobt=0 >> $seqres.full
_fixed_by_kernel_commit 237d7887ae72 \
"xfs: show the proper user quota options"
+_require_xfs_nocrc
_require_test
_require_loop
_require_xfs_io_command "falloc"