]> 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>
Thu, 15 Aug 2024 18:49:42 +0000 (11:49 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 16 Aug 2024 21:54:35 +0000 (14:54 -0700)
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 836fbb65e46234f77ca8c126952b1dc6cc7d8cb7..614d3631985ed63c43b544b1b608fa7e33607472 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 2f9015a5434c82d920d28072afbbb21481dd13c2..be072f030a1d6a12161728475aef62a32ed92d2e 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_RTGI_SUMMARY);
        case XFS_SCRUB_METAPATH_RTRMAPBT:
                return xchk_setup_metapath_rtginode(sc, XFS_RTGI_RMAP);
+       case XFS_SCRUB_METAPATH_RTREFCOUNTBT:
+               return xchk_setup_metapath_rtginode(sc, XFS_RTGI_REFCOUNT);
        default:
                return -ENOENT;
        }