xfs: only run scrub in dry run mode

When checking a filesystem, explicitly run xfs_scrub in dry run mode
so that it will not ever try to preen, fix, or optimize anything.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Darrick J. Wong
2017-07-21 15:04:27 -07:00
committed by Eryu Guan
parent 6cce8575a5
commit 93d6007671
+1 -1
View File
@@ -331,7 +331,7 @@ _check_xfs_filesystem()
if [ "$type" = "xfs" ]; then if [ "$type" = "xfs" ]; then
if [ -n "$TEST_XFS_SCRUB" ] && [ -x "$XFS_SCRUB_PROG" ]; then if [ -n "$TEST_XFS_SCRUB" ] && [ -x "$XFS_SCRUB_PROG" ]; then
"$XFS_SCRUB_PROG" $scrubflag -vd $device >>$seqres.full "$XFS_SCRUB_PROG" $scrubflag -v -d -n $device >>$seqres.full
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
_log_err "filesystem on $device failed scrub" _log_err "filesystem on $device failed scrub"
ok=0 ok=0