All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs/254: fix non-unique fsid issue
@ 2022-01-05  6:03 Anand Jain
  0 siblings, 0 replies; only message in thread
From: Anand Jain @ 2022-01-05  6:03 UTC (permalink / raw)
  To: guan, fstests; +Cc: linux-btrfs

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@oracle.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-05  6:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05  6:03 [PATCH] btrfs/254: fix non-unique fsid issue Anand Jain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.