From: Darrick J. Wong Date: Mon, 29 Jul 2024 23:22:52 +0000 (-0700) Subject: xfs: teach online scrub to find directory tree structure problems X-Git-Tag: v6.10.0~24^2~31 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44ecd42fab8d23da1a707f513d91f5fc4c122b9b;p=thirdparty%2Fxfsprogs-dev.git xfs: teach online scrub to find directory tree structure problems 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 Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index dd13bfa5..85f2a7e2 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -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)