]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: scrub the metadir path of rt rmap btree files
authorDarrick J. Wong <djwong@kernel.org>
Mon, 12 Aug 2024 07:38:00 +0000 (09:38 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 11:53:01 +0000 (13:53 +0200)
Add a new XFS_SCRUB_METAPATH subtype so that we can scrub the metadata
directory tree path to the rmap btree file for each rt group.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/scrub/metapath.c

index 9e2486e839a4bcb2ab3a7cc28aaf6485aabd0a78..036dc246b9ab9961b19d5cd401ad103209e54ce4 100644 (file)
@@ -826,9 +826,10 @@ struct xfs_scrub_vec_head {
 #define XFS_SCRUB_METAPATH_RTDIR       (1)  /* rtrgroups metadir */
 #define XFS_SCRUB_METAPATH_RTBITMAP    (2)  /* per-rtg bitmap */
 #define XFS_SCRUB_METAPATH_RTSUMMARY   (3)  /* per-rtg summary */
+#define XFS_SCRUB_METAPATH_RTRMAPBT    (4)  /* realtime reverse mapping */
 
 /* Number of metapath sm_ino values */
-#define XFS_SCRUB_METAPATH_NR          4
+#define XFS_SCRUB_METAPATH_NR          (5)
 
 /*
  * ioctl limits
index 98cb367ac4471ad5c0997be15d459f2395723ba8..98d98b083c8b81f8bceecd1fce3233b95cc66735 100644 (file)
@@ -21,6 +21,7 @@
 #include "xfs_trans_space.h"
 #include "xfs_attr.h"
 #include "xfs_rtgroup.h"
+#include "xfs_rtrmap_btree.h"
 #include "scrub/scrub.h"
 #include "scrub/common.h"
 #include "scrub/trace.h"
@@ -182,6 +183,8 @@ xchk_setup_metapath(
                return xchk_setup_metapath_rtginode(sc, XFS_RTG_BITMAP);
        case XFS_SCRUB_METAPATH_RTSUMMARY:
                return xchk_setup_metapath_rtginode(sc, XFS_RTG_SUMMARY);
+       case XFS_SCRUB_METAPATH_RTRMAPBT:
+               return xchk_setup_metapath_rtginode(sc, XFS_RTG_RMAP);
        default:
                return -ENOENT;
        }