mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfs: scrub fs at the end of the test
Teach _check_xfs_filesystem to scrub mounted filesystems before unmounting and fscking them. This is mostly to test the online scrub tool... 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:
committed by
Eryu Guan
parent
72cdba7141
commit
7f6f53aa50
@@ -2400,6 +2400,13 @@ _check_xfs_filesystem()
|
||||
|
||||
if [ "$type" = "xfs" ]
|
||||
then
|
||||
if [ -n "$TEST_XFS_SCRUB" ] && [ -x "$XFS_SCRUB_PROG" ]; then
|
||||
"$XFS_SCRUB_PROG" $scrubflag -vd $device >>$seqres.full
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "filesystem on $device failed scrub (see $seqres.full)"
|
||||
ok=0
|
||||
fi
|
||||
fi
|
||||
# mounted ...
|
||||
mountpoint=`_umount_or_remount_ro $device`
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user