diff mbox series

[09/41] xfs_db: disable xfs_check when metadir is enabled

Message ID 173498941106.2294268.4061755876736342352.stgit@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series [01/41] libxfs: constify the xfs_inode predicates | expand

Commit Message

Darrick J. Wong Dec. 23, 2024, 9:48 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

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 |    6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/db/check.c b/db/check.c
index fb7b6cb41a3fbf..37306bd7a6ac2d 100644
--- a/db/check.c
+++ b/db/check.c
@@ -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