]> 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, 23 Sep 2024 20:42:48 +0000 (13:42 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 9 Oct 2024 13:55:51 +0000 (15:55 +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 9d833798cb59a5b238601c70a1eb12d692135453..7a7b9bdad0e02cfa602f889ecb0ca95af2599cf6 100644 (file)
@@ -833,9 +833,10 @@ struct xfs_scrub_vec_head {
 #define XFS_SCRUB_METAPATH_GRPQUOTA    (6)  /* group quota */
 #define XFS_SCRUB_METAPATH_PRJQUOTA    (7)  /* project quota */
 #define XFS_SCRUB_METAPATH_RTRMAPBT    (8)  /* realtime reverse mapping */
+#define XFS_SCRUB_METAPATH_RTREFCOUNTBT        (9)  /* realtime refcount */
 
 /* Number of metapath sm_ino values */
-#define XFS_SCRUB_METAPATH_NR          (9)
+#define XFS_SCRUB_METAPATH_NR          (10)
 
 /*
  * ioctl limits
index f891da1e240c3fb330b08f645bd625df927d883d..bed1c99183af58366823795dbc2b8218bd50cffa 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"
@@ -265,6 +266,8 @@ xchk_setup_metapath(
                return xchk_setup_metapath_dqinode(sc, XFS_DQTYPE_PROJ);
        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;
        }