Skip to contentSkip to conversation

btrfs: a new test case to verify mount behavior with background remounting

PATCH Superseded Qu Wenruo 5 participants 5 messages Nov 1, 2024 – Nov 26, 2024 Btrfs file system

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Qu Wenruo

author
#0 lore raw

PATCH v2 1/1 btrfs: a new test case to verify mount behavior with background remounting

[BUG]
When there is a process in the background remounting a btrfs, switching between RO/RW, then another process try to mount another subvolume of the same btrfs read-only, we can hit a race causing the RW mount to fail with -EBUSY:

[CAUSE]
During the btrfs mount, to support mounting different subvolumes with different RO/RW flags, we have a small hack during the mount:

Retry with matching RO flags if the initial mount fail with -EBUSY.

The problem is, during that retry we do not hold any super block lock (s_umount), this meanings there can be a remount process changing the RO flags of the original fs super block.

If so, we can have an EBUSY error during retry.
And this time we treat any failure as an error, without any retry and cause the above EBUSY mount failure.

[FIX]
The fix is already sent to the mailing list.
The fix is to allow btrfs to have different RO flag between super block and mount point during mount, and if the RO flag mismatch, reconfigure the fs to RW with s_umount hold, so that there will be no race.

[TEST CASE]
The test case will create two processes:

- Remounting an existing subvolume mount point
Switching between RO and RW

- Mounting another subvolume RW
After a successful mount, unmount and retry.

This is enough to trigger the -EBUSY error in less than 5 seconds. To be extra safe, the test case will run for 10 seconds at least, and follow TIME_FACTOR for extra loads.

---
Changelog:
v2:
- Better signal handling for both remount and mount workload Need to do the extra handling for both workload

- Wait for any child process to exit before cleanup

- Keep the stderr of the final rm command

- Keep the stderr of the unmount of $subv1_mount
Which should always be mounted.

- Use "$UMOUNT_PROG" instead of direct "umount"

- Use "_mount" instead of direct "mount"

- Fix a typo of "block"

---
 tests/btrfs/325     | 99 +++++++++++++++++++++++++++++++++++++++++++++
 tests/btrfs/325.out |  2 +
 2 files changed, 101 insertions(+)
 create mode 100755 tests/btrfs/325
 create mode 100644 tests/btrfs/325.out
tests/btrfs/325 new file +99 -0
new file mode 100755
index 00000000..ffa10c61
@@ -0,0 +1,99 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2024 SUSE Linux Products GmbH. All Rights Reserved.
+#
+# FS QA Test 325
+#
+# Test that mounting a subvolume read-write will success, with another
+# subvolume being remounted RO/RW at background
+#
+. ./common/preamble
+_begin_fstest auto quick mount remount
+
+_fixed_by_kernel_commit xxxxxxxxxxxx \
+	"btrfs: fix mount failure due to remount races"
+
+_cleanup()
+{
+	cd /
+	kill "$remount_pid" "$mount_pid" &> /dev/null
+	wait &> /dev/null
+	$UMOUNT_PROG "$subv1_mount" &> /dev/null
+	$UMOUNT_PROG "$subv2_mount" &> /dev/null
+	rm -rf -- "$subv1_mount" &> /dev/null
+	rm -rf -- "$subv2_mount" &> /dev/null
+}
+
+# For the extra mount points
+_require_test
+_require_scratch
+
+_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mount
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol1 >> $seqres.full
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol2 >> $seqres.full
+_scratch_unmount
+
+subv1_mount="$TEST_DIR/subvol1_mount"
+subv2_mount="$TEST_DIR/subvol2_mount"
+mkdir -p "$subv1_mount"
+mkdir -p "$subv2_mount"
+_mount "$SCRATCH_DEV" "$subv1_mount" -o subvol=subvol1
+
+# Subv1 remount workload, mount the subv1 and switching it between
+# RO and RW.
+remount_workload()
+{
+	trap "wait; exit" SIGTERM
+	while true; do
+		_mount -o remount,ro "$subv1_mount"
+		_mount -o remount,rw "$subv1_mount"
+	done
+}
+
+remount_workload &
+remount_pid=$!
+
+# Subv2 rw mount workload
+# For unpatched kernel, this will fail with -EBUSY.
+#
+# To maintain the per-subvolume RO/RW mount, if the existing btrfs is
+# mounted RO, unpatched btrfs will retry with its RO flag reverted,
+# then reconfigure the fs to RW.
+#
+# But such retry has no super block lock hold, thus if another remount
+# process has already remounted the fs RW, the attempt will fail and
+# return -EBUSY.
+#
+# Patched kernel will allow the superblock and mount point RO flags
+# to differ, and then hold the s_umount to reconfigure the super block
+# to RW, preventing any possible race.
+mount_workload()
+{
+	trap "wait; exit" SIGTERM
+	while true; do
+		_mount "$SCRATCH_DEV" "$subv2_mount"
+		$UMOUNT_PROG "$subv2_mount"
+	done
+}
+
+mount_workload &
+mount_pid=$!
+
+sleep $(( 10 * $TIME_FACTOR ))
+
+kill "$remount_pid" "$mount_pid"
+wait
+
+# subv1 is always mounted, thus the umount should not fail.
+$UMOUNT_PROG "$subv1_mount"
+$UMOUNT_PROG "$subv2_mount" &> /dev/null
+
+rm -rf -- "$subv1_mount" "$subv2_mount"
+
+
+echo "Silence is golden"
+
+# success, all done
+status=0
+exit
tests/btrfs/325.out new file +2 -0
new file mode 100644
index 00000000..cf13795c
@@ -0,0 +1,2 @@
+QA output created by 325
+Silence is golden
Signature · 1 line
2.46.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 33 lines · Qu Wenruo

[BUG]
When there is a process in the background remounting a btrfs, switching between RO/RW, then another process try to mount another subvolume of the same btrfs read-only, we can hit a race causing the RW mount to fail with -EBUSY:

[CAUSE]
During the btrfs mount, to support mounting different subvolumes with different RO/RW flags, we have a small hack during the mount:

Retry with matching RO flags if the initial mount fail with -EBUSY.

The problem is, during that retry we do not hold any super block lock (s_umount), this meanings there can be a remount process changing the RO flags of the original fs super block.

If so, we can have an EBUSY error during retry.
And this time we treat any failure as an error, without any retry and cause the above EBUSY mount failure.

[FIX]
The fix is already sent to the mailing list.
The fix is to allow btrfs to have different RO flag between super block and mount point during mount, and if the RO flag mismatch, reconfigure the fs to RW with s_umount hold, so that there will be no race.

[TEST CASE]
The test case will create two processes:

- Remounting an existing subvolume mount point
Switching between RO and RW

Quoted 8 lines

- Mounting another subvolume RW
After a successful mount, unmount and retry.

This is enough to trigger the -EBUSY error in less than 5 seconds. To be extra safe, the test case will run for 10 seconds at least, and follow TIME_FACTOR for extra loads.

Looks good. It fails with an unpatched kernel and passes with a patched kernel. Thanks.

Quoted 142 lines

---
Changelog:
v2:
- Better signal handling for both remount and mount workload Need to do the extra handling for both workload

- Wait for any child process to exit before cleanup

- Keep the stderr of the final rm command

- Keep the stderr of the unmount of $subv1_mount
Which should always be mounted.

- Use "$UMOUNT_PROG" instead of direct "umount"

- Use "_mount" instead of direct "mount"

- Fix a typo of "block"

---
 tests/btrfs/325     | 99 +++++++++++++++++++++++++++++++++++++++++++++
 tests/btrfs/325.out |  2 +
 2 files changed, 101 insertions(+)
 create mode 100755 tests/btrfs/325
 create mode 100644 tests/btrfs/325.out
tests/btrfs/325 new file +99 -0
new file mode 100755
index 00000000..ffa10c61
@@ -0,0 +1,99 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2024 SUSE Linux Products GmbH. All Rights Reserved.
+#
+# FS QA Test 325
+#
+# Test that mounting a subvolume read-write will success, with another
+# subvolume being remounted RO/RW at background
+#
+. ./common/preamble
+_begin_fstest auto quick mount remount
+
+_fixed_by_kernel_commit xxxxxxxxxxxx \
+       "btrfs: fix mount failure due to remount races"
+
+_cleanup()
+{
+       cd /
+       kill "$remount_pid" "$mount_pid" &> /dev/null
+       wait &> /dev/null
+       $UMOUNT_PROG "$subv1_mount" &> /dev/null
+       $UMOUNT_PROG "$subv2_mount" &> /dev/null
+       rm -rf -- "$subv1_mount" &> /dev/null
+       rm -rf -- "$subv2_mount" &> /dev/null
+}
+
+# For the extra mount points
+_require_test
+_require_scratch
+
+_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mount
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol1 >> $seqres.full
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol2 >> $seqres.full
+_scratch_unmount
+
+subv1_mount="$TEST_DIR/subvol1_mount"
+subv2_mount="$TEST_DIR/subvol2_mount"
+mkdir -p "$subv1_mount"
+mkdir -p "$subv2_mount"
+_mount "$SCRATCH_DEV" "$subv1_mount" -o subvol=subvol1
+
+# Subv1 remount workload, mount the subv1 and switching it between
+# RO and RW.
+remount_workload()
+{
+       trap "wait; exit" SIGTERM
+       while true; do
+               _mount -o remount,ro "$subv1_mount"
+               _mount -o remount,rw "$subv1_mount"
+       done
+}
+
+remount_workload &
+remount_pid=$!
+
+# Subv2 rw mount workload
+# For unpatched kernel, this will fail with -EBUSY.
+#
+# To maintain the per-subvolume RO/RW mount, if the existing btrfs is
+# mounted RO, unpatched btrfs will retry with its RO flag reverted,
+# then reconfigure the fs to RW.
+#
+# But such retry has no super block lock hold, thus if another remount
+# process has already remounted the fs RW, the attempt will fail and
+# return -EBUSY.
+#
+# Patched kernel will allow the superblock and mount point RO flags
+# to differ, and then hold the s_umount to reconfigure the super block
+# to RW, preventing any possible race.
+mount_workload()
+{
+       trap "wait; exit" SIGTERM
+       while true; do
+               _mount "$SCRATCH_DEV" "$subv2_mount"
+               $UMOUNT_PROG "$subv2_mount"
+       done
+}
+
+mount_workload &
+mount_pid=$!
+
+sleep $(( 10 * $TIME_FACTOR ))
+
+kill "$remount_pid" "$mount_pid"
+wait
+
+# subv1 is always mounted, thus the umount should not fail.
+$UMOUNT_PROG "$subv1_mount"
+$UMOUNT_PROG "$subv2_mount" &> /dev/null
+
+rm -rf -- "$subv1_mount" "$subv2_mount"
+
+
+echo "Silence is golden"
+
+# success, all done
+status=0
+exit
tests/btrfs/325.out new file +2 -1
new file mode 100644
index 00000000..cf13795c
@@ -0,0 +1,2 @@
+QA output created by 325
+Silence is golden
--

2.46.0

#2 lore raw
In reply to Qu Wenruo
Quoted 53 lines · Qu Wenruo

[BUG]
When there is a process in the background remounting a btrfs, switching between RO/RW, then another process try to mount another subvolume of the same btrfs read-only, we can hit a race causing the RW mount to fail with -EBUSY:

[CAUSE]
During the btrfs mount, to support mounting different subvolumes with different RO/RW flags, we have a small hack during the mount:

Retry with matching RO flags if the initial mount fail with -EBUSY.

The problem is, during that retry we do not hold any super block lock (s_umount), this meanings there can be a remount process changing the RO flags of the original fs super block.

If so, we can have an EBUSY error during retry.
And this time we treat any failure as an error, without any retry and cause the above EBUSY mount failure.

[FIX]
The fix is already sent to the mailing list.
The fix is to allow btrfs to have different RO flag between super block and mount point during mount, and if the RO flag mismatch, reconfigure the fs to RW with s_umount hold, so that there will be no race.

[TEST CASE]
The test case will create two processes:

- Remounting an existing subvolume mount point
Switching between RO and RW

- Mounting another subvolume RW
After a successful mount, unmount and retry.

This is enough to trigger the -EBUSY error in less than 5 seconds. To be extra safe, the test case will run for 10 seconds at least, and follow TIME_FACTOR for extra loads.

---
Changelog:
v2:
- Better signal handling for both remount and mount workload Need to do the extra handling for both workload

- Wait for any child process to exit before cleanup

- Keep the stderr of the final rm command

- Keep the stderr of the unmount of $subv1_mount
Which should always be mounted.

Quoted 6 lines

- Use "$UMOUNT_PROG" instead of direct "umount"

- Use "_mount" instead of direct "mount"

- Fix a typo of "block"
---

Thanks for this new case. A few of picky review points below :)

Quoted 20 lines
 tests/btrfs/325     | 99 +++++++++++++++++++++++++++++++++++++++++++++
 tests/btrfs/325.out |  2 +
 2 files changed, 101 insertions(+)
 create mode 100755 tests/btrfs/325
 create mode 100644 tests/btrfs/325.out
tests/btrfs/325 new file +8 -0
new file mode 100755
index 00000000..ffa10c61
@@ -0,0 +1,99 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2024 SUSE Linux Products GmbH. All Rights Reserved.
+#
+# FS QA Test 325
+#
+# Test that mounting a subvolume read-write will success, with another
+# subvolume being remounted RO/RW at background

tests/btrfs/325 line 18

Quoted 10 lines
tests/btrfs/325 new file +10 -0
+#
+. ./common/preamble
+_begin_fstest auto quick mount remount
+
+_fixed_by_kernel_commit xxxxxxxxxxxx \
+	"btrfs: fix mount failure due to remount races"
+
+_cleanup()
+{
+	cd /

rm -r -f $tmp.*

tests/btrfs/325 line 19

Quoted 1 line
tests/btrfs/325 new file +1 -0
+	kill "$remount_pid" "$mount_pid" &> /dev/null

With below "unset" (see below), we can:

[ -n "$mount_pid" ] && kill $mount_pid
[ -n "$remount_pid" ] && kill $remount_pid

tests/btrfs/325 line 20

Quoted 1 line
tests/btrfs/325 new file +1 -0
+	wait &> /dev/null

Just curious, what can cause "wait" command print something?

tests/btrfs/325 line 24

Quoted 4 lines
tests/btrfs/325 new file +4 -0
+	$UMOUNT_PROG "$subv1_mount" &> /dev/null
+	$UMOUNT_PROG "$subv2_mount" &> /dev/null
+	rm -rf -- "$subv1_mount" &> /dev/null
+	rm -rf -- "$subv2_mount" &> /dev/null

rm "-f" prints nothing, so

rm -rf -- "$subv1_mount" "$subv2_mount"

tests/btrfs/325 line 34

Quoted 10 lines
tests/btrfs/325 new file +10 -0
+}
+
+# For the extra mount points
+_require_test
+_require_scratch
+
+_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mount
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol1 >> $seqres.full
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol2 >> $seqres.full

Hmm... I wondering what'll happen, if remove these two lines then run this test on other filesystems :)

tests/btrfs/325 line 38

Quoted 4 lines
tests/btrfs/325 new file +4 -0
+_scratch_unmount
+
+subv1_mount="$TEST_DIR/subvol1_mount"
+subv2_mount="$TEST_DIR/subvol2_mount"

Better to try to remove them at first. We can't make sure these names never be existed in $TEST_DIR.

Quoted 38 lines
tests/btrfs/325 new file +38 -0
+mkdir -p "$subv1_mount"
+mkdir -p "$subv2_mount"
+_mount "$SCRATCH_DEV" "$subv1_mount" -o subvol=subvol1
+
+# Subv1 remount workload, mount the subv1 and switching it between
+# RO and RW.
+remount_workload()
+{
+	trap "wait; exit" SIGTERM
+	while true; do
+		_mount -o remount,ro "$subv1_mount"
+		_mount -o remount,rw "$subv1_mount"
+	done
+}
+
+remount_workload &
+remount_pid=$!
+
+# Subv2 rw mount workload
+# For unpatched kernel, this will fail with -EBUSY.
+#
+# To maintain the per-subvolume RO/RW mount, if the existing btrfs is
+# mounted RO, unpatched btrfs will retry with its RO flag reverted,
+# then reconfigure the fs to RW.
+#
+# But such retry has no super block lock hold, thus if another remount
+# process has already remounted the fs RW, the attempt will fail and
+# return -EBUSY.
+#
+# Patched kernel will allow the superblock and mount point RO flags
+# to differ, and then hold the s_umount to reconfigure the super block
+# to RW, preventing any possible race.
+mount_workload()
+{
+	trap "wait; exit" SIGTERM
+	while true; do
+		_mount "$SCRATCH_DEV" "$subv2_mount"
+		$UMOUNT_PROG "$subv2_mount"

tests/btrfs/325 line 86

Quoted 10 lines
tests/btrfs/325 new file +10 -0
+	done
+}
+
+mount_workload &
+mount_pid=$!
+
+sleep $(( 10 * $TIME_FACTOR ))
+
+kill "$remount_pid" "$mount_pid"
+wait

unset remount_pid mount_pid

to avoid later kill (in _cleanup) kill other processes.

tests/btrfs/325 line 92

Quoted 6 lines
tests/btrfs/325 new file +6 -0
+
+# subv1 is always mounted, thus the umount should not fail.
+$UMOUNT_PROG "$subv1_mount"
+$UMOUNT_PROG "$subv2_mount" &> /dev/null
+
+rm -rf -- "$subv1_mount" "$subv2_mount"

Do this in _cleanup (as above), so this line can be removed if it's not a necessary test step of this case.

Others look good to me.

Thanks,
Zorro

Quoted 19 lines
tests/btrfs/325 new file +7 -0
+
+
+echo "Silence is golden"
+
+# success, all done
+status=0
+exit
tests/btrfs/325.out new file +2 -0
new file mode 100644
index 00000000..cf13795c
@@ -0,0 +1,2 @@
+QA output created by 325
+Silence is golden
Signature · 1 line
2.46.0
#3 lore raw

在 2024/11/1 23:25, Zorro Lang 写道:
[...]

Quoted 5 lines

tests/btrfs/325 line 18

Quoted 3 lines
tests/btrfs/325 new file +3 -0
+_cleanup()
+{
+	cd /

rm -r -f $tmp.*

The test doesn't utilize any temporary file AFAIK.

Quoted 7 lines

tests/btrfs/325 line 19

Quoted 2 lines
tests/btrfs/325 new file +1 -0
+	kill "$remount_pid" "$mount_pid" &> /dev/null

With below "unset" (see below), we can:

[ -n "$mount_pid" ] && kill $mount_pid
[ -n "$remount_pid" ] && kill $remount_pid

If both pids unset, kill will do nothing but shows its usage. In that case since we re-direct both stderr and stdout, it will not cause anything wrong.

Quoted 4 lines

tests/btrfs/325 line 20

Quoted 2 lines
tests/btrfs/325 new file +1 -0
+	wait &> /dev/null

Just curious, what can cause "wait" command print something?

"wait" can output errors for invalid options or the pid is not a child one.

But without any option it doesn't seem to output any error message.

Quoted 9 lines

tests/btrfs/325 line 24

Quoted 5 lines
tests/btrfs/325 new file +4 -0
+	$UMOUNT_PROG "$subv1_mount" &> /dev/null
+	$UMOUNT_PROG "$subv2_mount" &> /dev/null
+	rm -rf -- "$subv1_mount" &> /dev/null
+	rm -rf -- "$subv2_mount" &> /dev/null

rm "-f" prints nothing, so

rm -rf -- "$subv1_mount" "$subv2_mount"

Nope. it can output error like -EBUSY if any of the mount point is still being mounted.

Thus to be extra safe I prefer to do all the redirection in the cleanup function.

As I have hit problems inside the cleanup function too many times, mostly because the previous version is lacking the signal handling for each workload.

Quoted 14 lines

tests/btrfs/325 line 34

Quoted 11 lines
tests/btrfs/325 new file +10 -0
+}
+
+# For the extra mount points
+_require_test
+_require_scratch
+
+_scratch_mkfs >> $seqres.full 2>&1
+_scratch_mount
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol1 >> $seqres.full
+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol2 >> $seqres.full

Hmm... I wondering what'll happen, if remove these two lines then run this test on other filesystems :)

Not sure about other filesystems, but do other filesystems allows different RO/RW flags for the same fs?

Quoted 60 lines

tests/btrfs/325 line 38

Quoted 5 lines
tests/btrfs/325 new file +4 -0
+_scratch_unmount
+
+subv1_mount="$TEST_DIR/subvol1_mount"
+subv2_mount="$TEST_DIR/subvol2_mount"

Better to try to remove them at first. We can't make sure these names never be existed in $TEST_DIR.

Quoted 38 lines
tests/btrfs/325 new file +38 -0
+mkdir -p "$subv1_mount"
+mkdir -p "$subv2_mount"
+_mount "$SCRATCH_DEV" "$subv1_mount" -o subvol=subvol1
+
+# Subv1 remount workload, mount the subv1 and switching it between
+# RO and RW.
+remount_workload()
+{
+	trap "wait; exit" SIGTERM
+	while true; do
+		_mount -o remount,ro "$subv1_mount"
+		_mount -o remount,rw "$subv1_mount"
+	done
+}
+
+remount_workload &
+remount_pid=$!
+
+# Subv2 rw mount workload
+# For unpatched kernel, this will fail with -EBUSY.
+#
+# To maintain the per-subvolume RO/RW mount, if the existing btrfs is
+# mounted RO, unpatched btrfs will retry with its RO flag reverted,
+# then reconfigure the fs to RW.
+#
+# But such retry has no super block lock hold, thus if another remount
+# process has already remounted the fs RW, the attempt will fail and
+# return -EBUSY.
+#
+# Patched kernel will allow the superblock and mount point RO flags
+# to differ, and then hold the s_umount to reconfigure the super block
+# to RW, preventing any possible race.
+mount_workload()
+{
+	trap "wait; exit" SIGTERM
+	while true; do
+		_mount "$SCRATCH_DEV" "$subv2_mount"
+		$UMOUNT_PROG "$subv2_mount"

tests/btrfs/325 line 86

Quoted 10 lines
tests/btrfs/325 new file +10 -0
+	done
+}
+
+mount_workload &
+mount_pid=$!
+
+sleep $(( 10 * $TIME_FACTOR ))
+
+kill "$remount_pid" "$mount_pid"
+wait

unset remount_pid mount_pid

Quoted 1 line

to avoid later kill (in _cleanup) kill other processes.

IIRC the child pid won't be reused until the parent process exits.

Quoted 10 lines

tests/btrfs/325 line 92

Quoted 7 lines
tests/btrfs/325 new file +6 -0
+
+# subv1 is always mounted, thus the umount should not fail.
+$UMOUNT_PROG "$subv1_mount"
+$UMOUNT_PROG "$subv2_mount" &> /dev/null
+
+rm -rf -- "$subv1_mount" "$subv2_mount"

Do this in _cleanup (as above), so this line can be removed if it's not a necessary test step of this case.

This is an extra safety check, to make sure the unmount is properly done.

And that's why here we do not re-direct the output, unlike cleanup.

As I have already hit cases where the rm returned EBUSY error due to races with the children processes not handling signal correctly.

Thanks,
Qu

Quoted 27 lines

Others look good to me.

Thanks,
Zorro

Quoted 19 lines
tests/btrfs/325 new file +7 -0
+
+
+echo "Silence is golden"
+
+# success, all done
+status=0
+exit
tests/btrfs/325.out new file +2 -1
new file mode 100644
index 00000000..cf13795c
@@ -0,0 +1,2 @@
+QA output created by 325
+Silence is golden
--

2.46.0

#4 lore raw
Quoted 8 lines · Qu Wenruo
Quoted 5 lines
Quoted 2 lines

+$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol1 >> $seqres.full +$BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol2 >> $seqres.full

Hmm... I wondering what'll happen, if remove these two lines then run this test on other filesystems :)

Not sure about other filesystems, but do other filesystems allows different RO/RW flags for the same fs?

The subvolumes utilize the bind mount, so other filesystems can do that as well but this will also do the synchronization inside VFS, while the subvolume mount is called internally.