common/rc: drop 'fsck -f' parameter from _repair_test_fs
PATCH v2 1/1 common/rc: drop 'fsck -f' parameter from _repair_test_fs
The '-f' parameter is fsck.ext# specific, where it's documented to:
Force checking even if filesystem is marked clean
_repair_test_fs() is only called on _check_test_fs() failure, so dropping the parameter should be possible without changing ext# behaviour.
Doing so fixes _repair_test_fs() on exfat, where fsck.exfat doesn't support '-f'.
---
v2: drop -f from default case instead of splitting out exfat case
common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/rc +1 -1
@@ -1231,7 +1231,7 @@ _repair_test_fs() ;; *) # Let's hope fsck -y suffices... - fsck -t $FSTYP -fy $TEST_DEV >$tmp.repair 2>&1 + fsck -t $FSTYP -y $TEST_DEV >$tmp.repair 2>&1 res=$? if test "$res" -lt 4 ; then res=0
Signature · 1 line
2.35.3
Quoted 9 lines · David Disseldorp
The '-f' parameter is fsck.ext# specific, where it's documented to:
Force checking even if filesystem is marked clean
_repair_test_fs()is only called on_check_test_fs()failure, so dropping the parameter should be possible without changing ext# behaviour.
Doing so fixes_repair_test_fs()on exfat, where fsck.exfat doesn't support '-f'.
Quoted 3 lines
Signed-off-by David Disseldorp <[email protected]>---
v2: drop -f from default case instead of splitting out exfat case
This version is good to me.
I remembered you hope to add a btrfs branch to _repair_scratch_fs and _repair_test_fs [1]. Is that still in your plan? Anand, could you provide more suggestions about that?
[1]
https://lore.kernel.org/fstests/20230808091454.4skdyjnaxjqa7zyi@zlang-mailbox/
Quoted 20 lines
common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +1
-1@@ -1231,7 +1231,7 @@ _repair_test_fs() ;; *) # Let's hope fsck -y suffices... - fsck -t $FSTYP -fy $TEST_DEV >$tmp.repair 2>&1 + fsck -t $FSTYP -y $TEST_DEV >$tmp.repair 2>&1 res=$? if test "$res" -lt 4 ; then res=0Signature · 1 line
2.35.3
Quoted 10 lines · Zorro Lang
Quoted 9 lines · David Disseldorp
The '-f' parameter is fsck.ext# specific, where it's documented to:
Force checking even if filesystem is marked clean
_repair_test_fs()is only called on_check_test_fs()failure, so dropping the parameter should be possible without changing ext# behaviour.
Doing so fixes_repair_test_fs()on exfat, where fsck.exfat doesn't support '-f'.
Quoted 7 lines
Quoted 3 lines
Signed-off-by David Disseldorp <[email protected]>---
v2: drop -f from default case instead of splitting out exfat caseThis version is good to me.
Reviewed-by Zorro Lang <[email protected]>
Thanks.
Quoted 3 lines
I remembered you hope to add a btrfs branch to
_repair_scratch_fsand_repair_test_fs[1]. Is that still in your plan? Anand, could you provide more suggestions about that?
Yes, that's still my plan, but I was hoping to get some more input on whether "btrfs check --repair ..." is sufficient before proposing the change.
Cheers, David
Quoted 16 lines · Zorro Lang
Quoted 9 lines · David Disseldorp
The '-f' parameter is fsck.ext# specific, where it's documented to:
Force checking even if filesystem is marked clean
_repair_test_fs()is only called on_check_test_fs()failure, so dropping the parameter should be possible without changing ext# behaviour.
Doing so fixes_repair_test_fs()on exfat, where fsck.exfat doesn't support '-f'.Quoted 3 lines
Signed-off-by David Disseldorp <[email protected]>---
v2: drop -f from default case instead of splitting out exfat caseThis version is good to me.
Quoted 8 lines
Reviewed-by Zorro Lang <[email protected]>I remembered you hope to add a btrfs branch to
_repair_scratch_fsand_repair_test_fs[1]. Is that still in your plan? Anand, could you provide more suggestions about that?[1]
https://lore.kernel.org/fstests/20230808091454.4skdyjnaxjqa7zyi@zlang-mailbox/
Thanks for bringing to my notice.
The reason fstyp=btrfs has not detected this missing part so far is that 'fsck -t btrfs' returns 0, along with a message to use 'btrfs check', which means repair is never invoked for the 'fstyp=btrfs'.
The appropriate repair command to use here is 'btrfs check --repair'. However, it would be better to address this in a separate patch as I guess some tests may fail. I will send a patch for it.
Thanks, Anand
Quoted 22 lines
Quoted 21 lines
common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)common/rc +1
-1@@ -1231,7 +1231,7 @@ _repair_test_fs() ;; *) # Let's hope fsck -y suffices... - fsck -t $FSTYP -fy $TEST_DEV >$tmp.repair 2>&1 + fsck -t $FSTYP -y $TEST_DEV >$tmp.repair 2>&1 res=$? if test "$res" -lt 4 ; then res=0Signature · 1 line
2.35.3