]> 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>
Wed, 29 May 2024 04:13:25 +0000 (21:13 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 24 Jul 2024 05:33:57 +0000 (22:33 -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 62ac6c0b4329910e79198edf2f8d546b459bca7f..bed9676f9322ec0c7a5bd35c302c9e22defbb04b 100644 (file)
@@ -827,9 +827,10 @@ struct xfs_scrub_vec_head {
 #define XFS_SCRUB_METAPATH_PROBE       (0)  /* do we have a metapath scrubber? */
 #define XFS_SCRUB_METAPATH_RTDIR       (1)  /* realtime metadir */
 #define XFS_SCRUB_METAPATH_RTRMAPBT    (2)  /* realtime reverse mapping */
+#define XFS_SCRUB_METAPATH_RTREFCOUNTBT        (3)  /* realtime refcount */
 
 /* Number of metapath sm_ino values */
-#define XFS_SCRUB_METAPATH_NR          (3)
+#define XFS_SCRUB_METAPATH_NR          (4)
 
 /*
  * ioctl limits
index d15d99135a877cb8b814077f48f04159985116d2..f8c3f71898ebd18c25cbbb798d21fd91d8c0e84c 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"
@@ -181,6 +182,8 @@ xchk_setup_metapath(
                return xchk_setup_metapath_rtdir(sc);
        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 -EINVAL;
        }