]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: teach online scrub to find directory tree structure problems
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:22:52 +0000 (16:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:03 +0000 (17:01 -0700)
Source kernel commit: 928b721a11789a9363d6d7c32a1f3166a79f3b5f

Create a new scrubber that detects corruptions within the directory tree
structure itself.  It can detect directories with multiple parents;
loops within the directory tree; and directory loops not accessible from
the root.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/xfs_fs.h

index dd13bfa500f2e8da150452e579346aebf775ea33..85f2a7e20ac00175ed7b3ea33a5688bed1218648 100644 (file)
@@ -719,9 +719,10 @@ struct xfs_scrub_metadata {
 #define XFS_SCRUB_TYPE_QUOTACHECK 25   /* quota counters */
 #define XFS_SCRUB_TYPE_NLINKS  26      /* inode link counts */
 #define XFS_SCRUB_TYPE_HEALTHY 27      /* everything checked out ok */
+#define XFS_SCRUB_TYPE_DIRTREE 28      /* directory tree structure */
 
 /* Number of scrub subcommands. */
-#define XFS_SCRUB_TYPE_NR      28
+#define XFS_SCRUB_TYPE_NR      29
 
 /* i: Repair this metadata. */
 #define XFS_SCRUB_IFLAG_REPAIR         (1u << 0)