Make sure xfs_repair can't clear the log by default when it is corrupted. xfs_repair always and only clear the log when the -L parameter is specified. This has updated by: Commit f2053bc ("xfs_repair: don't clear the log by default") Signed-off-by: Xiao Yang <yangx.jy@xxxxxxxxxxxxxx> --- common/rc | 4 ++-- tests/xfs/098 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/rc b/common/rc index 3fb0600..c693a31 100644 --- a/common/rc +++ b/common/rc @@ -1143,9 +1143,9 @@ _repair_scratch_fs() xfs) _scratch_xfs_repair "$@" 2>&1 res=$? - if [ "$res" -eq 2 ]; then + if [ "$res" -ne 0 ]; then echo "xfs_repair returns $res; replay log?" - _scratch_mount + _scratch_mount 2>&1 res=$? if [ "$res" -gt 0 ]; then echo "mount returns $res; zap log?" diff --git a/tests/xfs/098 b/tests/xfs/098 index d91d617..eb33bb1 100755 --- a/tests/xfs/098 +++ b/tests/xfs/098 @@ -93,7 +93,7 @@ echo "+ mount image" _scratch_mount 2>/dev/null && _fail "mount should not succeed" echo "+ repair fs" -_scratch_xfs_repair >> $seqres.full 2>&1 +_repair_scratch_fs >> $seqres.full echo "+ mount image (2)" _scratch_mount -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html