mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common/xfs: refactor xfs_scrub presence testing
Move all the requirements checking for xfs_scrub into a helper function. Make sure the helper properly detects the presence of the scrub ioctl and situations where we can't run scrub (e.g. norecovery). Refactor the existing three xfs_scrub call sites to use the helper to check if it's appropriate to run scrub. 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
4b69106b60
commit
5cd65cb761
@@ -88,9 +88,9 @@ Preparing system for tests:
|
||||
run xfs_repair -n to check the filesystem; xfs_repair to rebuild
|
||||
metadata indexes; and xfs_repair -n (a third time) to check the
|
||||
results of the rebuilding.
|
||||
- set TEST_XFS_SCRUB=1 to have _check_xfs_filesystem run
|
||||
xfs_scrub -vd to scrub the filesystem metadata online before
|
||||
unmounting to run the offline check.
|
||||
- xfs_scrub, if present, will always check the test and scratch
|
||||
filesystems if they are still online at the end of the test.
|
||||
It is no longer necessary to set TEST_XFS_SCRUB.
|
||||
- setenv LOGWRITES_DEV to a block device to use for power fail
|
||||
testing.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user