Skip to contentSkip to conversation

btrfs/162: Stop using device mount option

PATCH In review Nikolay Borisov 2 participants 2 messages Jul 24, 2020 – Jul 30, 2020 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs/162: Stop using device mount option

btrfs is clever enough to figure out which devices constitute the sprout fs even without specifying them explicitly with -o device. Additionally, explicitly settings the devices via -o device reduces coverage of the test since it didn't detect breakage a local change introduced. Without -o device instead this breakage was detected.

---
 tests/btrfs/162 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
tests/btrfs/162 +2 -3
index 7f119be057b7..ff3c50b1be54 100755
@@ -69,11 +69,10 @@ create_sprout_seed()
 
 create_next_sprout()
 {
-	run_check _mount -o device=$dev_seed $dev_sprout_seed $SCRATCH_MNT
+	run_check _mount $dev_sprout_seed $SCRATCH_MNT
 	_run_btrfs_util_prog device add -f $dev_sprout $SCRATCH_MNT
 	_scratch_unmount
-	run_check _mount -o device=$dev_seed,device=$dev_sprout_seed \
-		$dev_sprout $SCRATCH_MNT
+	run_check _mount $dev_sprout $SCRATCH_MNT
 	echo -- sprout --
 	od -x $SCRATCH_MNT/foobar
 }
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Nikolay Borisov

btrfs is clever enough to figure out which devices constitute the sprout fs even without specifying them explicitly with -o device.

holds good only in this test case.

Quoted 3 lines

Additionally,
explicitly settings the devices via -o device reduces coverage of the test since it didn't detect breakage a local change introduced.

We relay on unmount not freeing up the btrfs_device.

Quoted 2 lines

Without
-o device instead this breakage was detected.

That's like testing two things in one test case. I am ok.

Quoted 2 lines
Reviewed-by [email protected]