mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstest: enable xfs_repair for large filesystem testing
Now that large filesystem testing does not play free space games to fill the space without IO, we can enable xfs_repair when running in this mode. xfs_repair has had it's scalability problems solved, too, so this is a safe thing to do. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Rich Johnston <rjohnston@sgi.com> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
committed by
Rich Johnston
parent
725123ac74
commit
5635b681d4
@@ -1273,19 +1273,17 @@ _check_xfs_filesystem()
|
||||
extra_mount_options=""
|
||||
device=$1
|
||||
if [ "$2" != "none" ]; then
|
||||
extra_log_options="-l$2"
|
||||
extra_log_options="-l$2"
|
||||
extra_mount_options="-ologdev=$2"
|
||||
fi
|
||||
|
||||
if [ "$3" != "none" ]; then
|
||||
extra_rt_options="-r$3"
|
||||
extra_rt_options="-r$3"
|
||||
extra_mount_options=$extra_mount_options" -ortdev=$3"
|
||||
fi
|
||||
extra_mount_options=$extra_mount_options" $MOUNT_OPTIONS"
|
||||
|
||||
[ "$FSTYP" != xfs ] && return 0
|
||||
testoption=""
|
||||
[ "$LARGE_SCRATCH_DEV" = yes ] && testoption=-t
|
||||
|
||||
type=`_fs_type $device`
|
||||
ok=1
|
||||
@@ -1310,8 +1308,13 @@ _check_xfs_filesystem()
|
||||
ok=0
|
||||
fi
|
||||
|
||||
$XFS_CHECK_PROG $testoption $extra_log_options $device 2>&1 |\
|
||||
_fix_malloc >$tmp.fs_check
|
||||
# xfs_check runs out of memory on large files, so even providing the test
|
||||
# option (-t) to avoid indexing the free space trees doesn't make it pass on
|
||||
# large filesystems. Avoid it.
|
||||
if [ "$LARGE_SCRATCH_DEV" != yes ]; then
|
||||
$XFS_CHECK_PROG $extra_log_options $device 2>&1 |\
|
||||
_fix_malloc >$tmp.fs_check
|
||||
fi
|
||||
if [ -s $tmp.fs_check ]
|
||||
then
|
||||
echo "_check_xfs_filesystem: filesystem on $device is inconsistent (c) (see $seq.full)"
|
||||
@@ -1323,8 +1326,7 @@ _check_xfs_filesystem()
|
||||
|
||||
ok=0
|
||||
fi
|
||||
# repair doesn't scale massively at this stage, optionally skip it for now
|
||||
[ "$LARGE_SCRATCH_DEV" = yes ] || \
|
||||
|
||||
$XFS_REPAIR_PROG -n $extra_log_options $extra_rt_options $device >$tmp.repair 2>&1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user