Skip to contentSkip to conversation

xfs/189: noattr2 invalid for CRC enabled filesystems

PATCH In review Dave Chinner 2 participants 4 messages Feb 5, 2014 – Feb 10, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs/189: noattr2 invalid for CRC enabled filesystems

From: Dave Chinner <[email protected]>

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.

---
 tests/xfs/189 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
tests/xfs/189 +10 -1
index 27bfb63..addf7ce 100755
@@ -241,7 +241,16 @@ _require_scratch
 unset SCRATCH_RTDEV
 unset SCRATCH_LOGDEV
 
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _filter_mkfs 2> $tmp.mkfs
+
+# check to see if we've made a CRC enabled filesystem. If so,
+# we can't run the test because CRc enabled filesystems don't support
+# noattr2 mount options and this will cause cascading failures that are
+# impossible to filter.
+. $tmp.mkfs
+if [ $crc -eq 1 ]; then
+	_notrun "Filesystem CRCs enabled, noattr2 is not supported."
+fi
 
 _add_scratch_fstab
 _test_remount_rw
Signature · 6 lines
1.8.4.rc3

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw
Quoted 24 lines · Dave Chinner

From: Dave Chinner <[email protected]>

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.

---
 tests/xfs/189 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
tests/xfs/189 +0 -1
index 27bfb63..addf7ce 100755
@@ -241,7 +241,16 @@ _require_scratch
 unset SCRATCH_RTDEV
 unset SCRATCH_LOGDEV
 
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null

tests/xfs/189 _require_scratch · line 253

Quoted 10 lines
tests/xfs/189 +10 -0
+_scratch_mkfs_xfs | _filter_mkfs 2> $tmp.mkfs
+
+# check to see if we've made a CRC enabled filesystem. If so,
+# we can't run the test because CRc enabled filesystems don't support
+# noattr2 mount options and this will cause cascading failures that are
+# impossible to filter.
+. $tmp.mkfs
+if [ $crc -eq 1 ]; then
+	_notrun "Filesystem CRCs enabled, noattr2 is not supported."
+fi

I really don't like opencoding this. Shouldn't we instead simplfy pass a nocrc argument to _scratch_mkfs_xfs?

Alternatively this magic should move into a helper.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
Quoted 24 lines · Christoph Hellwig
Quoted 23 lines · Dave Chinner

From: Dave Chinner <[email protected]>

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.

---
 tests/xfs/189 | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
tests/xfs/189 +0 -0
index 27bfb63..addf7ce 100755
@@ -241,7 +241,16 @@ _require_scratch
 unset SCRATCH_RTDEV
 unset SCRATCH_LOGDEV
 
Quoted 14 lines

tests/xfs/189 _require_scratch · line 253

Quoted 11 lines
tests/xfs/189 +10 -1
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _filter_mkfs 2> $tmp.mkfs
+
+# check to see if we've made a CRC enabled filesystem. If so,
+# we can't run the test because CRc enabled filesystems don't support
+# noattr2 mount options and this will cause cascading failures that are
+# impossible to filter.
+. $tmp.mkfs
+if [ $crc -eq 1 ]; then
+	_notrun "Filesystem CRCs enabled, noattr2 is not supported."
+fi

I really don't like opencoding this. Shouldn't we instead simplfy pass a nocrc argument to _scratch_mkfs_xfs?

No, that simply breaks old mkfs binaries.

Quoted 1 line

Alternatively this magic should move into a helper.

I'll roll it into a _requires_noattr2 helper.

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw
Quoted 4 lines · Dave Chinner
Quoted 2 lines

I really don't like opencoding this. Shouldn't we instead simplfy pass a nocrc argument to _scratch_mkfs_xfs?

No, that simply breaks old mkfs binaries.

Well, we couldn't pass it unconditionally - the main idea is to hide the magic and allow tests to easily create a noncrc filesystem.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs