From: Darrick J. Wong <djwong@xxxxxxxxxx> 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@xxxxxxxxxx> --- libfrog/scrub.c | 5 +++++ libxfs/xfs_fs.h | 3 ++- scrub/scrub.c | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/libfrog/scrub.c b/libfrog/scrub.c index b22770d639c..8822fc0088c 100644 --- a/libfrog/scrub.c +++ b/libfrog/scrub.c @@ -197,6 +197,11 @@ const struct xfrog_scrub_descr xfrog_metapaths[XFS_SCRUB_METAPATH_NR] = { .descr = "project quota metadir path", .group = XFROG_SCRUB_GROUP_FS, }, + [XFS_SCRUB_METAPATH_RTRMAPBT] = { + .name = "rtrmapbt", + .descr = "rmap btree file metadir path", + .group = XFROG_SCRUB_GROUP_RTGROUP, + }, }; /* Invoke the scrub ioctl. Returns zero or negative error code. */ diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index dcf048aae8c..0bbdbfb0a8a 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -804,9 +804,10 @@ struct xfs_scrub_metadata { #define XFS_SCRUB_METAPATH_USRQUOTA 2 #define XFS_SCRUB_METAPATH_GRPQUOTA 3 #define XFS_SCRUB_METAPATH_PRJQUOTA 4 +#define XFS_SCRUB_METAPATH_RTRMAPBT 5 /* Number of metapath sm_ino values */ -#define XFS_SCRUB_METAPATH_NR 5 +#define XFS_SCRUB_METAPATH_NR 6 /* * ioctl limits diff --git a/scrub/scrub.c b/scrub/scrub.c index 8f9fde80263..f20910de855 100644 --- a/scrub/scrub.c +++ b/scrub/scrub.c @@ -66,6 +66,9 @@ format_metapath_descr( (unsigned long long)vhead->svh_ino); sc = &xfrog_metapaths[vhead->svh_ino]; + if (sc->group == XFROG_SCRUB_GROUP_RTGROUP) + return snprintf(buf, buflen, _("rtgroup %u %s"), + vhead->svh_agno, _(sc->descr)); return snprintf(buf, buflen, "%s", _(sc->descr)); }