fstests: btrfs/220: do not use nologreplay when possible
PATCH 1/1 fstests: btrfs/220: do not use nologreplay when possible
[BUG]
If the system is using mount from util-linux 2.41 or newer, the test case will fail with the following error:
FSTYP -- btrfs PLATFORM -- Linux/x86_64 btrfs-vm 6.15.0-rc5-custom+ #238 SMP PREEMPT_DYNAMIC Wed May 7 14:10:51 ACST 2025 MKFS_OPTIONS -- /dev/mapper/test-scratch1
MOUNT_OPTIONS -- /dev/mapper/test-scratch1 /mnt/scratch
btrfs/220 6s ... - output mismatch (see /home/adam/xfstests/results//btrfs/220.out.bad)
--- tests/btrfs/220.out 2022-05-11 11:25:30.749999997 +0930
+++ /home/adam/xfstests/results//btrfs/220.out.bad 2025-05-13 16:26:18.068521503 +0930
@@ -1,2 +1,4 @@
QA output created by 220
+mount warning:
+ * btrfs: Deprecated parameter 'nologreplay'
Silence is golden
...
(Run 'diff -u /home/adam/xfstests/tests/btrfs/220.out /home/adam/xfstests/results//btrfs/220.out.bad' to see the entire diff)
Ran: btrfs/220
Failures: btrfs/220
Failed 1 of 1 tests
[CAUSE]
The newer mount command provides the extra ability to show warning during mount.
Although btrfs still supports "nologreplay" mount option to keep consistency with other filesystems, we will output a warning and encourage users to use "rescue=nologreplay" instead.
During "nologreplay" mount option test, normally we will mount use the newer "rescue=nologreplay" mount option if the kernel supports.
But the following two call sites are still unconditionally utilizing the deprecated "nologreplay" mount option directly:
- Expected failure when using nologreplay and rw mount
- Mount option verification that "nologreplay" is converted to "rescue=nologreplay"
The second call site caused the above mount warning message and fail the test case.
[FIX]
If the kernel supports "rescue=nologreplay" we should not utilized "nologreplay" at all.
This will avoid the mount warning on the deprecated and discouraged "nologreplay" mount option.
--- tests/btrfs/220 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
tests/btrfs/220 +2 -5
@@ -202,16 +202,13 @@ test_non_revertible_options() { test_mount_opt "degraded" "degraded" - # nologreplay should be used only with readonly - test_should_fail "nologreplay" - if [ "$enable_rescue_nologreplay" = true ]; then #rescue=nologreplay should be used only with readonly test_should_fail "rescue=nologreplay" - - test_mount_opt "nologreplay,ro" "ro,rescue=nologreplay" test_mount_opt "rescue=nologreplay,ro" "ro,rescue=nologreplay" else + # nologreplay should be used only with readonly + test_should_fail "nologreplay" test_mount_opt "nologreplay,ro" "ro,nologreplay" fi
Signature · 1 line
2.49.0
Quoted 47 lines · Qu Wenruo
[BUG]
If the system is using mount from util-linux 2.41 or newer, the test case will fail with the following error:FSTYP -- btrfs PLATFORM -- Linux/x86_64 btrfs-vm 6.15.0-rc5-custom+ #238 SMP PREEMPT_DYNAMIC Wed May 7 14:10:51 ACST 2025 MKFS_OPTIONS -- /dev/mapper/test-scratch1
MOUNT_OPTIONS--/dev/mapper/test-scratch1/mnt/scratchbtrfs/220 6s ... - output mismatch (see /home/adam/xfstests/results//btrfs/220.out.bad) --- tests/btrfs/220.out 2022-05-11 11:25:30.749999997 +0930 +++ /home/adam/xfstests/results//btrfs/220.out.bad 2025-05-13 16:26:18.068521503 +0930 @@ -1,2 +1,4 @@ QA output created by 220 +mount warning: + * btrfs: Deprecated parameter 'nologreplay' Silence is golden ... (Run 'diff -u /home/adam/xfstests/tests/btrfs/220.out /home/adam/xfstests/results//btrfs/220.out.bad' to see the entire diff) Ran: btrfs/220 Failures: btrfs/220 Failed 1 of 1 tests[CAUSE]
The newer mount command provides the extra ability to show warning during mount.Although btrfs still supports "nologreplay" mount option to keep consistency with other filesystems, we will output a warning and encourage users to use "rescue=nologreplay" instead.
During "nologreplay" mount option test, normally we will mount use the newer "rescue=nologreplay" mount option if the kernel supports.
But the following two call sites are still unconditionally utilizing the deprecated "nologreplay" mount option directly:
- Expected failure when using nologreplay and rw mount
- Mount option verification that "nologreplay" is converted to "rescue=nologreplay"
The second call site caused the above mount warning message and fail the test case.
Quoted 7 lines
[FIX]
If the kernel supports "rescue=nologreplay" we should not utilized "nologreplay" at all.This will avoid the mount warning on the deprecated and discouraged "nologreplay" mount option.
test_mount_opt "nologreplay,ro" "ro,rescue=nologreplay"
validates that the old mount option nologreply doesn't break on newer kernels that support rescue=nologreply and provides a Warning.
Why not keep this test line and filter out the deprecated parameter warning?
Thanks, Anand
Quoted 28 lines
Signed-off-by Qu Wenruo <[email protected]>--- tests/btrfs/220 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)tests/btrfs/220 +2
-5@@ -202,16 +202,13 @@ test_non_revertible_options() { test_mount_opt "degraded" "degraded" - # nologreplay should be used only with readonly - test_should_fail "nologreplay" - if [ "$enable_rescue_nologreplay" = true ]; then #rescue=nologreplay should be used only with readonly test_should_fail "rescue=nologreplay" - - test_mount_opt "nologreplay,ro" "ro,rescue=nologreplay" test_mount_opt "rescue=nologreplay,ro" "ro,rescue=nologreplay" else + # nologreplay should be used only with readonly + test_should_fail "nologreplay" test_mount_opt "nologreplay,ro" "ro,nologreplay" fi
Quoted 56 lines · Anand Jain
Quoted 47 lines · Qu Wenruo
[BUG]
If the system is using mount from util-linux 2.41 or newer, the test case will fail with the following error:FSTYP -- btrfs
PLATFORM -- Linux/x86_64 btrfs-vm 6.15.0-rc5-custom+ #238 SMPPREEMPT_DYNAMICWed May 7 14:10:51 ACST 2025 MKFS_OPTIONS --/dev/mapper/test-scratch1
MOUNT_OPTIONS--/dev/mapper/test-scratch1/mnt/scratchbtrfs/220 6s ... - output mismatch (see
/home/adam/xfstests/results//btrfs/220.out.bad)
--- tests/btrfs/220.out 2022-05-11 11:25:30.749999997 +0930
+++/home/adam/xfstests/results//btrfs/220.out.bad2025-05-13 16:26:18.068521503 +0930
@@ -1,2 +1,4 @@
QA output created by 220
+mount warning:
+ * btrfs: Deprecated parameter 'nologreplay'
Silence is golden
...
(Run 'diff -u/home/adam/xfstests/tests/btrfs/220.out/home/adam/xfstests/results//btrfs/220.out.bad' to see the entire diff)
Ran: btrfs/220
Failures: btrfs/220
Failed 1 of 1 tests[CAUSE]
The newer mount command provides the extra ability to show warning during mount.Although btrfs still supports "nologreplay" mount option to keep consistency with other filesystems, we will output a warning and encourage users to use "rescue=nologreplay" instead.
During "nologreplay" mount option test, normally we will mount use the newer "rescue=nologreplay" mount option if the kernel supports.
But the following two call sites are still unconditionally utilizing the deprecated "nologreplay" mount option directly:
- Expected failure when using nologreplay and rw mount
- Mount option verification that "nologreplay" is converted to "rescue=nologreplay"
The second call site caused the above mount warning message and fail the test case.
Quoted 7 lines
[FIX]
If the kernel supports "rescue=nologreplay" we should not utilized "nologreplay" at all.This will avoid the mount warning on the deprecated and discouraged "nologreplay" mount option.
Quoted 7 lines
test_mount_opt"nologreplay,ro" "ro,rescue=nologreplay"validates that the old mount option
nologreplydoesn't break on newer kernels that supportrescue=nologreplyand provides a Warning.Why not keep this test line and filter out the deprecated parameter warning?
I'd say, if some option is deprecated, we should not use it at all.
Filtering out the warning may ignore some other problems not related to the deprecated option, thus I do not think it's a good idea.
Thanks,
Qu
Quoted 61 lines · Qu Wenruo
Quoted 58 lines · Anand Jain
Quoted 47 lines · Qu Wenruo
[BUG]
If the system is using mount from util-linux 2.41 or newer, the test case will fail with the following error:FSTYP -- btrfs
PLATFORM -- Linux/x86_64 btrfs-vm 6.15.0-rc5-custom+ #238 SMPPREEMPT_DYNAMICWed May 7 14:10:51 ACST 2025 MKFS_OPTIONS --/dev/mapper/test-scratch1
MOUNT_OPTIONS--/dev/mapper/test-scratch1/mnt/scratchbtrfs/220 6s ... - output mismatch (see
/home/adam/xfstests/results//btrfs/220.out.bad)
--- tests/btrfs/220.out 2022-05-11 11:25:30.749999997 +0930
+++/home/adam/xfstests/results//btrfs/220.out.bad2025-05-13 16:26:18.068521503 +0930
@@ -1,2 +1,4 @@
QA output created by 220
+mount warning:
+ * btrfs: Deprecated parameter 'nologreplay'
Silence is golden
...
(Run 'diff -u/home/adam/xfstests/tests/btrfs/220.out/home/adam/xfstests/results//btrfs/220.out.bad' to see the entire diff)
Ran: btrfs/220
Failures: btrfs/220
Failed 1 of 1 tests[CAUSE]
The newer mount command provides the extra ability to show warning during mount.Although btrfs still supports "nologreplay" mount option to keep consistency with other filesystems, we will output a warning and encourage users to use "rescue=nologreplay" instead.
During "nologreplay" mount option test, normally we will mount use the newer "rescue=nologreplay" mount option if the kernel supports.
But the following two call sites are still unconditionally utilizing the deprecated "nologreplay" mount option directly:
- Expected failure when using nologreplay and rw mount
- Mount option verification that "nologreplay" is converted to "rescue=nologreplay"
The second call site caused the above mount warning message and fail the test case.
Quoted 7 lines
[FIX]
If the kernel supports "rescue=nologreplay" we should not utilized "nologreplay" at all.This will avoid the mount warning on the deprecated and discouraged "nologreplay" mount option.
test_mount_opt"nologreplay,ro" "ro,rescue=nologreplay"
Quoted 9 lines
Quoted 5 lines
validates that the old mount option
nologreplydoesn't break on newer kernels that supportrescue=nologreplyand provides a Warning.Why not keep this test line and filter out the deprecated parameter warning?
I'd say, if some option is deprecated, we should not use it at all.
It's marked as deprecated, but the code still needs testing. Also, since fstests runs on stable LTS kernels too, it's better not to remove it yet.
Quoted 1 line
Filtering out the warning may ignore some other problems not related to the deprecated option, thus I do not think it's a good idea.
why not something like:
(untested)
_filter_deprecated_warning()
{
# mount warning: # * btrfs: Deprecated parameter 'nologreplay'
grep -v "btrfs: Deprecated parameter 'nologreplay'" | grep -v "mount
warning:"
}
test_mount_opt "nologreplay,ro" "ro,rescue=nologreplay" 2>&1 | \
_filter_deprecated_warning
Thanks, Anand
Quoted 2 lines
Thanks,
Qu
Quoted 1 line · Anand Jain
On 13/5/25 16:56, Qu Wenruo wrote:
[...]
Quoted 6 lines
Quoted 2 lines
I'd say, if some option is deprecated, we should not use it at all.
It's marked as deprecated, but the code still needs testing. Also, since fstests runs on stable LTS kernels too, it's better not to remove it yet.
For older kernels without "rescue=" alias, it will not cause any problem at all, because it will set "enable_rescue_nologreplay" to false and completely skip anything related to "rescue=nologreplay"
But different vice-verse, as "rescue=nologreplay" still touches the older one. I do not think we will keep the "nologreplay" support in the future very soon.
In the past we had some problem relateds to "norecovery" mount option, deprecated it and reverted back (some other projects still relies on this mount option, and all other fses have exactly the same named one).
But "nologreplay" is btrfs specific, we can remove it any time in the future.
I think this is the perfect time to considering removing "nologreplay" completely.
Thanks,
Qu>
Quoted 26 lines
Quoted 1 line
Filtering out the warning may ignore some other problems not related to the deprecated option, thus I do not think it's a good idea.
why not something like:
(untested)
_filter_deprecated_warning()
{# mount warning: # * btrfs: Deprecated parameter 'nologreplay'grep -v "btrfs: Deprecated parameter 'nologreplay'" | grep -v
"mount warning:"
}
test_mount_opt"nologreplay,ro" "ro,rescue=nologreplay" 2>&1 | \
_filter_deprecated_warningThanks, Anand
Quoted 2 lines
Thanks,
Qu
Quoted 25 lines · Qu Wenruo
Quoted 1 line · Anand Jain
On 13/5/25 16:56, Qu Wenruo wrote:
[...]
Quoted 6 lines
Quoted 2 lines
I'd say, if some option is deprecated, we should not use it at all.
It's marked as deprecated, but the code still needs testing. Also, since fstests runs on stable LTS kernels too, it's better not to remove it yet.
For older kernels without "rescue=" alias, it will not cause any problem at all, because it will set "
enable_rescue_nologreplay" to false and completely skip anything related to "rescue=nologreplay"But different vice-verse, as "rescue=nologreplay" still touches the older one.
I do not think we will keep the "nologreplay" support in the future very soon.In the past we had some problem relateds to "norecovery" mount option, deprecated it and reverted back (some other projects still relies on this mount option, and all other fses have exactly the same named one).
Quoted 5 lines
But "nologreplay" is btrfs specific, we can remove it any time in the future.
I think this is the perfect time to considering removing "nologreplay" completely.
Standalone 'nologreplay' yes. The warning has been there since 74ef00185eb86425215 5.9 from 2020, which is 5.10 stable. This should be enough time.
Quoted 29 lines · David Sterba
Quoted 28 lines · Qu Wenruo
Quoted 1 line · Anand Jain
On 13/5/25 16:56, Qu Wenruo wrote:
[...]
Quoted 6 lines
Quoted 2 lines
I'd say, if some option is deprecated, we should not use it at all.
It's marked as deprecated, but the code still needs testing. Also, since fstests runs on stable LTS kernels too, it's better not to remove it yet.
For older kernels without "rescue=" alias, it will not cause any problem at all, because it will set "
enable_rescue_nologreplay" to false and completely skip anything related to "rescue=nologreplay"But different vice-verse, as "rescue=nologreplay" still touches the older one.
I do not think we will keep the "nologreplay" support in the future very soon.In the past we had some problem relateds to "norecovery" mount option, deprecated it and reverted back (some other projects still relies on this mount option, and all other fses have exactly the same named one).
But "nologreplay" is btrfs specific, we can remove it any time in the future.
Quoted 6 lines
Quoted 2 lines
I think this is the perfect time to considering removing "nologreplay" completely.
Standalone 'nologreplay' yes. The warning has been there since
74ef00185eb864252155.9 from 2020, which is 5.10 stable. This should be enough time.
Got it. Thanks Anand
Thanks.