xfs/189: noattr2 invalid for CRC enabled filesystems
authorDave Chinner <dchinner@redhat.com>
Thu, 13 Mar 2014 03:58:16 +0000 (14:58 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 13 Mar 2014 03:58:16 +0000 (14:58 +1100)
Version 5 filesystems always have attr2 format enabled, and it
cannot be turned off via the noattr2 mount option. As such, attempts
to mount with noattr2 will be rejected and this causes cascading
failures within the test.

Hence detect if we've created a CRC enabled filesystem, and if this
is the case _notrun the test.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/attr
tests/xfs/189

index 1f3e57f4dd8fb0541d189e8acbf353998459b8b0..83bf9d149d4449d510cb1752fb7e8b2b4e00b837 100644 (file)
@@ -196,6 +196,16 @@ _require_attr_v1()
                || _notrun "attr v1 not supported on $SCRATCH_DEV"
 }
 
+# check if we support the noattr2 mount option
+_require_noattr2()
+{
+       _scratch_mkfs_xfs > /dev/null 2>&1 \
+               || _fail "_scratch_mkfs_xfs failed on $SCRATCH_DEV"
+       _mount -o noattr2 $SCRATCH_DEV > /dev/null 2>&1 \
+               || _notrun "noattr2 mount option not supported on $SCRATCH_DEV"
+       _scratch_unmount
+}
+
 # getfattr -R returns info in readdir order which varies from fs to fs.
 # This sorts the output by filename
 _sort_getfattr_output()
index 27bfb63ef15d18cde3c53ac931f52d3ff981c979..a56bbdec5ce6d4f2520199363560e31fb41f230d 100755 (executable)
@@ -230,6 +230,7 @@ _putback_scratch_fstab()
 # get standard environment, filters and checks
 . ./common/rc
 . ./common/filter
+. ./common/attr
 
 # real QA test starts here
 _supported_fs xfs
@@ -237,6 +238,7 @@ _supported_os Linux
 
 _need_to_be_root
 _require_scratch
+_require_noattr2
 
 unset SCRATCH_RTDEV
 unset SCRATCH_LOGDEV