]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: disable xfs_check when metadir is enabled
authorDarrick J. Wong <djwong@kernel.org>
Thu, 21 Nov 2024 00:24:15 +0000 (16:24 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:26 +0000 (18:01 -0800)
As of July 2024, xfs_repair can detect more types of corruptions than
xfs_check does.  I don't think it makes sense to maintain the xfs_check
code anymore, so let's just turn it off for any filesystem that has
metadata directory trees.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/check.c

index fb7b6cb41a3fbf11de50d3f758a5cafa99caacd7..37306bd7a6ac2d79b0f01cbed02cbaf4decbf9d2 100644 (file)
@@ -831,6 +831,12 @@ blockget_f(
                dbprefix = oldprefix;
                return 0;
        }
+
+       if (xfs_has_metadir(mp)) {
+               dbprefix = oldprefix;
+               return 0;
+       }
+
        check_rootdir();
        /*
         * Check that there are no blocks either