]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common/xfs: skip xfs_check unless the test runner forces us to
authorDarrick J. Wong <djwong@kernel.org>
Wed, 1 Sep 2021 00:11:16 +0000 (17:11 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 5 Sep 2021 13:15:10 +0000 (21:15 +0800)
At long last I've completed my quest to ensure that every corruption
found by xfs_check can also be found by xfs_repair.  Since xfs_check
uses more memory than repair and has long been obsolete, let's stop
running it automatically from _check_xfs_filesystem unless the test
runner makes us do it.

Tests that explicitly want xfs_check can call it via _scratch_xfs_check
or _xfs_check; that part doesn't go away.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
README
common/xfs

diff --git a/README b/README
index 84c217ce94f57f662b3d11bd94277004dbdb9c22..63f0641a3af0d740962cbc187f66da625e52bdc9 100644 (file)
--- a/README
+++ b/README
@@ -125,6 +125,10 @@ Preparing system for tests:
               time we should try a patient module remove. The default is 50
               seconds. Set this to "forever" and we'll wait forever until the
               module is gone.
+             - Set FORCE_XFS_CHECK_PROG=yes to have _check_xfs_filesystem run
+               xfs_check to check the filesystem.  As of August 2021,
+               xfs_repair finds all filesystem corruptions found by xfs_check,
+               and more, which means that xfs_check is no longer run by default.
 
         - or add a case to the switch in common/config assigning
           these variables based on the hostname of your test
index c5e3942721dbc1cd0b63462b73aa47c568e2ec40..bfb1bf1eae8565f9fa853027720f5db59285a160 100644 (file)
@@ -595,10 +595,14 @@ _check_xfs_filesystem()
                ok=0
        fi
 
-       # 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 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.
+       #
+       # As of August 2021, xfs_repair completely supersedes xfs_check's
+       # ability to find corruptions, so we no longer run xfs_check unless
+       # forced to run it.
+       if [ "$LARGE_SCRATCH_DEV" != yes ] && [ "$FORCE_XFS_CHECK_PROG" = "yes" ]; then
                _xfs_check $extra_log_options $device 2>&1 > $tmp.fs_check
        fi
        if [ -s $tmp.fs_check ]; then