[PATCH] btrfs/254: fix non-unique fsid issue

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



This test case needs two scratch fs. For debugging purposes, a fsid is
kept known. However, mkfs-btrfs has a stringent and inconsistent
approach, to check if that fsid is already present on any of the other
disks in the system. (This does not apply to the virtual devices in the
system).

To avoid running into the non-unique fsid found error, remove the known
fsid.

Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
---
 tests/btrfs/254 | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/btrfs/254 b/tests/btrfs/254
index b70b9d165897..2f3ae50f2e3e 100755
--- a/tests/btrfs/254
+++ b/tests/btrfs/254
@@ -11,7 +11,7 @@
 #	btrfs: harden identification of the stale device
 #
 . ./common/preamble
-_begin_fstest auto quick
+_begin_fstest auto quick volume
 
 # Override the default cleanup function.
 node=$seq-test
@@ -55,7 +55,6 @@ setup_dmdev()
 }
 
 # Use a known it is much easier to debug.
-uuid="--uuid 12345678-1234-1234-1234-123456789abc"
 lvdev=/dev/mapper/$node
 
 seq_mnt=$TEST_DIR/$seq.mnt
@@ -66,7 +65,7 @@ test_forget()
 	setup_dmdev
 	dmdev=$(realpath $lvdev)
 
-	_mkfs_dev $uuid $dmdev
+	_mkfs_dev $dmdev
 
 	# Check if we can un-scan using the mapper device path.
 	$BTRFS_UTIL_PROG device scan --forget $lvdev
@@ -88,9 +87,9 @@ test_add_device()
 	_mkfs_dev $scratch_dev3
 	_mount $scratch_dev3 $seq_mnt
 
-	_mkfs_dev $uuid -draid1 -mraid1 $lvdev $scratch_dev2
+	_mkfs_dev -draid1 -mraid1 $lvdev $scratch_dev2
 
-	# Add device should free the device under $uuid in the kernel.
+	# Added device should free the stale device in the kernel.
 	$BTRFS_UTIL_PROG device add -f $dmdev $seq_mnt > /dev/null 2>&1
 
 	_mount -o degraded $scratch_dev2 $SCRATCH_MNT
-- 
2.33.1




[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