[PATCH] xfstests: Add message indicating btrfs-progs support FST in read-only mode

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Gu JinXiang <gujx@xxxxxxxxxxxxxx>

btrfs-progs now support FST in read-only mode, so when space_cache=v2
enabled, this test case will fail.
Add message to help user to understand this status.

Signed-off-by: Gu JinXiang <gujx@xxxxxxxxxxxxxx>
---
 tests/btrfs/012 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/btrfs/012 b/tests/btrfs/012
index 85c82f07..529e6eca 100755
--- a/tests/btrfs/012
+++ b/tests/btrfs/012
@@ -96,6 +96,12 @@ cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT/new
 
 _scratch_unmount
 
+space_cache_version=$(echo "$MOUNT_OPTIONS" | grep "space_cache=v2")
+if [ -n "$space_cache_version" ]; then
+	_fail "since used space_cache=v2 when mount," \
+	       "and for FST btrfs-progs support is read-only."\
+	      "so btrfs-convert rollback will fail"
+fi
 # Now restore the ext4 device
 $BTRFS_CONVERT_PROG -r $SCRATCH_DEV >> $seqres.full 2>&1 || \
 	_fail "btrfs-convert rollback failed"
-- 
2.13.5



--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux