]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: scrub the metadir path of rt refcount btree files
authorDarrick J. Wong <djwong@kernel.org>
Mon, 12 Aug 2024 07:39:13 +0000 (09:39 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 11:53:11 +0000 (13:53 +0200)
Add a new XFS_SCRUB_METAPATH subtype so that we can scrub the metadata
directory tree path to the refcount 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 53e2416befc9bc39b8cfd739a9bc2c5c8d7e3272..94c0d50467e35418c7944a52497bb4d8127e3fe7 100644 (file)
@@ -828,9 +828,10 @@ struct xfs_scrub_vec_head {
 #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 */
+#define XFS_SCRUB_METAPATH_RTREFCOUNTBT        (5)  /* realtime refcount */
 
 /* Number of metapath sm_ino values */
-#define XFS_SCRUB_METAPATH_NR          (5)
+#define XFS_SCRUB_METAPATH_NR          (6)
 
 /*
  * ioctl limits
index 98d98b083c8b81f8bceecd1fce3233b95cc66735..fc183132f0e9388876a4e9159851f0b217d8f9fc 100644 (file)
@@ -22,6 +22,7 @@
 #include "xfs_attr.h"
 #include "xfs_rtgroup.h"
 #include "xfs_rtrmap_btree.h"
+#include "xfs_rtrefcount_btree.h"
 #include "scrub/scrub.h"
 #include "scrub/common.h"
 #include "scrub/trace.h"
@@ -185,6 +186,8 @@ xchk_setup_metapath(
                return xchk_setup_metapath_rtginode(sc, XFS_RTG_SUMMARY);
        case XFS_SCRUB_METAPATH_RTRMAPBT:
                return xchk_setup_metapath_rtginode(sc, XFS_RTG_RMAP);
+       case XFS_SCRUB_METAPATH_RTREFCOUNTBT:
+               return xchk_setup_metapath_rtginode(sc, XFS_RTG_REFCOUNT);
        default:
                return -ENOENT;
        }