PATCH 3/3 V6] xfs: test changing UUID on V5 superblock
[xfstests-dev.git] / common / rc
index 5e83c809160f8ac60fa9d2c403ecbc7b9f480654..601dbbfbe744063860e4e81e0639139e48dae228 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -2714,6 +2714,21 @@ _require_test_fcntl_advisory_locks()
                _notrun "Require fcntl advisory locks support"
 }
 
+# XFS ability to change UUIDs on V5/CRC filesystems
+#
+_require_meta_uuid()
+{
+       # This will create a crc fs on $SCRATCH_DEV
+       _require_xfs_crc
+
+       $XFS_DB_PROG -x -c "uuid generate" $SCRATCH_DEV >/dev/null 2>&1 \
+          || _notrun "Userspace doesn't support meta_uuid feature"
+
+       _scratch_mount >/dev/null 2>&1 \
+          || _notrun "Kernel doesn't support meta_uuid feature"
+       umount $SCRATCH_MNT
+}
+
 _get_total_inode()
 {
        if [ -z "$1" ]; then