]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: scrub the realtime rmapbt
authorDarrick J. Wong <djwong@kernel.org>
Tue, 15 Oct 2024 19:40:00 +0000 (12:40 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:36:25 +0000 (13:36 -0800)
Check the realtime reverse mapping btree against the rtbitmap, and
modify the rtbitmap scrub to check against the rtrmapbt.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
15 files changed:
fs/xfs/Makefile
fs/xfs/libxfs/xfs_fs.h
fs/xfs/scrub/bmap.c
fs/xfs/scrub/bmap_repair.c
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/health.c
fs/xfs/scrub/inode.c
fs/xfs/scrub/inode_repair.c
fs/xfs/scrub/repair.c
fs/xfs/scrub/rtrmap.c [new file with mode: 0644]
fs/xfs/scrub/scrub.c
fs/xfs/scrub/scrub.h
fs/xfs/scrub/stats.c
fs/xfs/scrub/trace.h

index ff45efb2463f73f27a0f5887d15a658f7260e025..136a465e00d2b13772be7624dd3370bed185b209 100644 (file)
@@ -194,6 +194,7 @@ xfs-$(CONFIG_XFS_ONLINE_SCRUB_STATS) += scrub/stats.o
 xfs-$(CONFIG_XFS_RT)           += $(addprefix scrub/, \
                                   rgsuper.o \
                                   rtbitmap.o \
+                                  rtrmap.o \
                                   rtsummary.o \
                                   )
 
index 7cca458ff8124562df19ba6fbc00ad4c9fc83607..34fcbcd0bcd5e305450c1a6dee2398064059096c 100644 (file)
@@ -737,9 +737,10 @@ struct xfs_scrub_metadata {
 #define XFS_SCRUB_TYPE_DIRTREE 28      /* directory tree structure */
 #define XFS_SCRUB_TYPE_METAPATH        29      /* metadata directory tree paths */
 #define XFS_SCRUB_TYPE_RGSUPER 30      /* realtime superblock */
+#define XFS_SCRUB_TYPE_RTRMAPBT        31      /* rtgroup reverse mapping btree */
 
 /* Number of scrub subcommands. */
-#define XFS_SCRUB_TYPE_NR      31
+#define XFS_SCRUB_TYPE_NR      32
 
 /*
  * This special type code only applies to the vectored scrub implementation.
index b04e12cddc70052f433f05deb1032ed73552aa0e..e80cde3bea082823ad292a7ce913b2abd983bf18 100644 (file)
@@ -988,6 +988,7 @@ xchk_bmap(
        case XFS_DINODE_FMT_UUID:
        case XFS_DINODE_FMT_DEV:
        case XFS_DINODE_FMT_LOCAL:
+       case XFS_DINODE_FMT_RMAP:
                /* No mappings to check. */
                if (whichfork == XFS_COW_FORK)
                        xchk_fblock_set_corrupt(sc, whichfork, 0);
index 7c4955482641f796c0459b3b1cfcbbf61a451f31..29c3ac4ebeb310241ae2e5ed956c4f4a9c3d21c6 100644 (file)
@@ -731,6 +731,7 @@ xrep_bmap_check_inputs(
        case XFS_DINODE_FMT_DEV:
        case XFS_DINODE_FMT_LOCAL:
        case XFS_DINODE_FMT_UUID:
+       case XFS_DINODE_FMT_RMAP:
                return -ECANCELED;
        case XFS_DINODE_FMT_EXTENTS:
        case XFS_DINODE_FMT_BTREE:
index 613fb54e723edee5bf311a13f823a5ee174cc901..89988f9fb9ddb82679c6292e589e514ff96d03a0 100644 (file)
@@ -35,6 +35,8 @@
 #include "xfs_exchmaps.h"
 #include "xfs_rtbitmap.h"
 #include "xfs_rtgroup.h"
+#include "xfs_rtrmap_btree.h"
+#include "xfs_bmap_util.h"
 #include "scrub/scrub.h"
 #include "scrub/common.h"
 #include "scrub/trace.h"
@@ -791,9 +793,28 @@ xchk_rtgroup_lock(
        } while (1);
 
        sr->rtlock_flags = rtglock_flags;
+
+       if (xfs_has_rtrmapbt(sc->mp) && (rtglock_flags & XFS_RTGLOCK_RMAP))
+               sr->rmap_cur = xfs_rtrmapbt_init_cursor(sc->tp, sr->rtg);
+
        return 0;
 }
 
+/*
+ * Free all the btree cursors and other incore data relating to the realtime
+ * group.  This has to be done /before/ committing (or cancelling) the scrub
+ * transaction.
+ */
+void
+xchk_rtgroup_btcur_free(
+       struct xchk_rt          *sr)
+{
+       if (sr->rmap_cur)
+               xfs_btree_del_cursor(sr->rmap_cur, XFS_BTREE_ERROR);
+
+       sr->rmap_cur = NULL;
+}
+
 /*
  * Unlock the realtime group.  This must be done /after/ committing (or
  * cancelling) the scrub transaction.
@@ -878,6 +899,14 @@ xchk_setup_fs(
        return xchk_trans_alloc(sc, resblks);
 }
 
+/* Set us up with a transaction and an empty context to repair rt metadata. */
+int
+xchk_setup_rt(
+       struct xfs_scrub        *sc)
+{
+       return xchk_trans_alloc(sc, 0);
+}
+
 /* Set us up with AG headers and btree cursors. */
 int
 xchk_setup_ag_btree(
@@ -1639,3 +1668,43 @@ xchk_inode_rootdir_inum(const struct xfs_inode *ip)
                return mp->m_metadirip->i_ino;
        return mp->m_rootip->i_ino;
 }
+
+/* Count the blocks used by a file, even if it's a metadata inode. */
+int
+xchk_inode_count_blocks(
+       struct xfs_scrub        *sc,
+       int                     whichfork,
+       xfs_extnum_t            *nextents,
+       xfs_filblks_t           *count)
+{
+       struct xfs_ifork        *ifp = xfs_ifork_ptr(sc->ip, whichfork);
+       struct xfs_btree_cur    *cur;
+       xfs_extlen_t            btblocks;
+       int                     error;
+
+       if (!ifp) {
+               *nextents = 0;
+               *count = 0;
+               return 0;
+       }
+
+       switch (ifp->if_format) {
+       case XFS_DINODE_FMT_RMAP:
+               if (!sc->sr.rtg) {
+                       ASSERT(0);
+                       return -EFSCORRUPTED;
+               }
+               cur = xfs_rtrmapbt_init_cursor(sc->tp, sc->sr.rtg);
+               error = xfs_btree_count_blocks(cur, &btblocks);
+               xfs_btree_del_cursor(cur, error);
+               if (error)
+                       return error;
+
+               *nextents = 0;
+               *count = btblocks - 1;
+               return 0;
+       default:
+               return xfs_bmap_count_blocks(sc->tp, sc->ip, whichfork,
+                               nextents, count);
+       }
+}
index e734572a8dd6ec417143d69f90f25d56ab5ed9f8..1576467f724431f39675be72fa41a53ef28f6fe8 100644 (file)
@@ -63,6 +63,7 @@ static inline int xchk_setup_nothing(struct xfs_scrub *sc)
 /* Setup functions */
 int xchk_setup_agheader(struct xfs_scrub *sc);
 int xchk_setup_fs(struct xfs_scrub *sc);
+int xchk_setup_rt(struct xfs_scrub *sc);
 int xchk_setup_ag_allocbt(struct xfs_scrub *sc);
 int xchk_setup_ag_iallocbt(struct xfs_scrub *sc);
 int xchk_setup_ag_rmapbt(struct xfs_scrub *sc);
@@ -80,10 +81,12 @@ int xchk_setup_metapath(struct xfs_scrub *sc);
 int xchk_setup_rtbitmap(struct xfs_scrub *sc);
 int xchk_setup_rtsummary(struct xfs_scrub *sc);
 int xchk_setup_rgsuperblock(struct xfs_scrub *sc);
+int xchk_setup_rtrmapbt(struct xfs_scrub *sc);
 #else
 # define xchk_setup_rtbitmap           xchk_setup_nothing
 # define xchk_setup_rtsummary          xchk_setup_nothing
 # define xchk_setup_rgsuperblock       xchk_setup_nothing
+# define xchk_setup_rtrmapbt           xchk_setup_nothing
 #endif
 #ifdef CONFIG_XFS_QUOTA
 int xchk_ino_dqattach(struct xfs_scrub *sc);
@@ -125,7 +128,8 @@ xchk_ag_init_existing(
 #ifdef CONFIG_XFS_RT
 
 /* All the locks we need to check an rtgroup. */
-#define XCHK_RTGLOCK_ALL       (XFS_RTGLOCK_BITMAP)
+#define XCHK_RTGLOCK_ALL       (XFS_RTGLOCK_BITMAP | \
+                                XFS_RTGLOCK_RMAP)
 
 int xchk_rtgroup_init(struct xfs_scrub *sc, xfs_rgnumber_t rgno,
                struct xchk_rt *sr);
@@ -143,11 +147,13 @@ xchk_rtgroup_init_existing(
 
 int xchk_rtgroup_lock(struct xfs_scrub *sc, struct xchk_rt *sr,
                unsigned int rtglock_flags);
+void xchk_rtgroup_btcur_free(struct xchk_rt *sr);
 void xchk_rtgroup_free(struct xfs_scrub *sc, struct xchk_rt *sr);
 #else
 # define xchk_rtgroup_init(sc, rgno, sr)               (-EFSCORRUPTED)
 # define xchk_rtgroup_init_existing(sc, rgno, sr)      (-EFSCORRUPTED)
 # define xchk_rtgroup_lock(sc, sr, lockflags)          (-EFSCORRUPTED)
+# define xchk_rtgroup_btcur_free(sr)                   do { } while (0)
 # define xchk_rtgroup_free(sc, sr)                     do { } while (0)
 #endif /* CONFIG_XFS_RT */
 
@@ -275,6 +281,8 @@ void xchk_fsgates_enable(struct xfs_scrub *sc, unsigned int scrub_fshooks);
 
 int xchk_inode_is_allocated(struct xfs_scrub *sc, xfs_agino_t agino,
                bool *inuse);
+int xchk_inode_count_blocks(struct xfs_scrub *sc, int whichfork,
+               xfs_extnum_t *nextents, xfs_filblks_t *count);
 
 bool xchk_inode_is_dirtree_root(const struct xfs_inode *ip);
 bool xchk_inode_is_sb_rooted(const struct xfs_inode *ip);
index ce86bdad37fa42653e0db0e71e6ac9d797d3e88a..13ef5632272b0f0c072c6e213dd5fab5746c1645 100644 (file)
@@ -112,6 +112,7 @@ static const struct xchk_health_map type_to_health_flag[XFS_SCRUB_TYPE_NR] = {
        [XFS_SCRUB_TYPE_DIRTREE]        = { XHG_INO, XFS_SICK_INO_DIRTREE },
        [XFS_SCRUB_TYPE_METAPATH]       = { XHG_FS,  XFS_SICK_FS_METAPATH },
        [XFS_SCRUB_TYPE_RGSUPER]        = { XHG_RTGROUP, XFS_SICK_RG_SUPER },
+       [XFS_SCRUB_TYPE_RTRMAPBT]       = { XHG_RTGROUP, XFS_SICK_RG_RMAPBT },
 };
 
 /* Return the health status mask for this scrub type. */
index 25ee66e7649d400a37466a6a40e1fcdfd6b92f10..a6262740251d0c73aba8764ce5060c100c1159f5 100644 (file)
@@ -502,6 +502,10 @@ xchk_dinode(
                if (!S_ISREG(mode) && !S_ISDIR(mode))
                        xchk_ino_set_corrupt(sc, ino);
                break;
+       case XFS_DINODE_FMT_RMAP:
+               if (!S_ISREG(mode))
+                       xchk_ino_set_corrupt(sc, ino);
+               break;
        case XFS_DINODE_FMT_UUID:
        default:
                xchk_ino_set_corrupt(sc, ino);
@@ -686,15 +690,13 @@ xchk_inode_xref_bmap(
                return;
 
        /* Walk all the extents to check nextents/naextents/nblocks. */
-       error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_DATA_FORK,
-                       &nextents, &count);
+       error = xchk_inode_count_blocks(sc, XFS_DATA_FORK, &nextents, &count);
        if (!xchk_should_check_xref(sc, &error, NULL))
                return;
        if (nextents < xfs_dfork_data_extents(dip))
                xchk_ino_xref_set_corrupt(sc, sc->ip->i_ino);
 
-       error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_ATTR_FORK,
-                       &nextents, &acount);
+       error = xchk_inode_count_blocks(sc, XFS_ATTR_FORK, &nextents, &acount);
        if (!xchk_should_check_xref(sc, &error, NULL))
                return;
        if (nextents != xfs_dfork_attr_extents(dip))
index 5a58ddd27bd2f5fc7c625342ccd7b153965b554a..af11b1398546d9967330e56772787de33e7314f5 100644 (file)
@@ -1500,8 +1500,7 @@ xrep_inode_blockcounts(
        trace_xrep_inode_blockcounts(sc);
 
        /* Set data fork counters from the data fork mappings. */
-       error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_DATA_FORK,
-                       &nextents, &count);
+       error = xchk_inode_count_blocks(sc, XFS_DATA_FORK, &nextents, &count);
        if (error)
                return error;
        if (xfs_is_reflink_inode(sc->ip)) {
@@ -1525,8 +1524,8 @@ xrep_inode_blockcounts(
        /* Set attr fork counters from the attr fork mappings. */
        ifp = xfs_ifork_ptr(sc->ip, XFS_ATTR_FORK);
        if (ifp) {
-               error = xfs_bmap_count_blocks(sc->tp, sc->ip, XFS_ATTR_FORK,
-                               &nextents, &acount);
+               error = xchk_inode_count_blocks(sc, XFS_ATTR_FORK, &nextents,
+                               &acount);
                if (error)
                        return error;
                if (count >= sc->mp->m_sb.sb_dblocks)
index 91c8bc055a4fd76a128d39037008145450d77d68..e788e3032f8e335eaf6dbe39506434f86c224f93 100644 (file)
@@ -62,6 +62,7 @@ xrep_attempt(
        trace_xrep_attempt(XFS_I(file_inode(sc->file)), sc->sm, error);
 
        xchk_ag_btcur_free(&sc->sa);
+       xchk_rtgroup_btcur_free(&sc->sr);
 
        /* Repair whatever's broken. */
        ASSERT(sc->ops->repair);
diff --git a/fs/xfs/scrub/rtrmap.c b/fs/xfs/scrub/rtrmap.c
new file mode 100644 (file)
index 0000000..2781c15
--- /dev/null
@@ -0,0 +1,185 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2018-2024 Oracle.  All Rights Reserved.
+ * Author: Darrick J. Wong <djwong@kernel.org>
+ */
+#include "xfs.h"
+#include "xfs_fs.h"
+#include "xfs_shared.h"
+#include "xfs_format.h"
+#include "xfs_trans_resv.h"
+#include "xfs_mount.h"
+#include "xfs_defer.h"
+#include "xfs_btree.h"
+#include "xfs_bit.h"
+#include "xfs_log_format.h"
+#include "xfs_trans.h"
+#include "xfs_sb.h"
+#include "xfs_rmap.h"
+#include "xfs_rmap_btree.h"
+#include "xfs_rtrmap_btree.h"
+#include "xfs_inode.h"
+#include "xfs_rtalloc.h"
+#include "xfs_rtgroup.h"
+#include "xfs_metafile.h"
+#include "scrub/xfs_scrub.h"
+#include "scrub/scrub.h"
+#include "scrub/common.h"
+#include "scrub/btree.h"
+#include "scrub/trace.h"
+
+/* Set us up with the realtime metadata locked. */
+int
+xchk_setup_rtrmapbt(
+       struct xfs_scrub        *sc)
+{
+       int                     error;
+
+       if (xchk_need_intent_drain(sc))
+               xchk_fsgates_enable(sc, XCHK_FSGATES_DRAIN);
+
+       error = xchk_rtgroup_init(sc, sc->sm->sm_agno, &sc->sr);
+       if (error)
+               return error;
+
+       error = xchk_setup_rt(sc);
+       if (error)
+               return error;
+
+       error = xchk_install_live_inode(sc,
+                       sc->sr.rtg->rtg_inodes[XFS_RTGI_RMAP]);
+       if (error)
+               return error;
+
+       return xchk_rtgroup_lock(sc, &sc->sr, XCHK_RTGLOCK_ALL);
+}
+
+/* Realtime reverse mapping. */
+
+struct xchk_rtrmap {
+       /*
+        * The furthest-reaching of the rmapbt records that we've already
+        * processed.  This enables us to detect overlapping records for space
+        * allocations that cannot be shared.
+        */
+       struct xfs_rmap_irec    overlap_rec;
+
+       /*
+        * The previous rmapbt record, so that we can check for two records
+        * that could be one.
+        */
+       struct xfs_rmap_irec    prev_rec;
+};
+
+/* Flag failures for records that overlap but cannot. */
+STATIC void
+xchk_rtrmapbt_check_overlapping(
+       struct xchk_btree               *bs,
+       struct xchk_rtrmap              *cr,
+       const struct xfs_rmap_irec      *irec)
+{
+       xfs_rtblock_t                   pnext, inext;
+
+       if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
+               return;
+
+       /* No previous record? */
+       if (cr->overlap_rec.rm_blockcount == 0)
+               goto set_prev;
+
+       /* Do overlap_rec and irec overlap? */
+       pnext = cr->overlap_rec.rm_startblock + cr->overlap_rec.rm_blockcount;
+       if (pnext <= irec->rm_startblock)
+               goto set_prev;
+
+       xchk_btree_set_corrupt(bs->sc, bs->cur, 0);
+
+       /* Save whichever rmap record extends furthest. */
+       inext = irec->rm_startblock + irec->rm_blockcount;
+       if (pnext > inext)
+               return;
+
+set_prev:
+       memcpy(&cr->overlap_rec, irec, sizeof(struct xfs_rmap_irec));
+}
+
+/* Decide if two reverse-mapping records can be merged. */
+static inline bool
+xchk_rtrmap_mergeable(
+       struct xchk_rtrmap              *cr,
+       const struct xfs_rmap_irec      *r2)
+{
+       const struct xfs_rmap_irec      *r1 = &cr->prev_rec;
+
+       /* Ignore if prev_rec is not yet initialized. */
+       if (cr->prev_rec.rm_blockcount == 0)
+               return false;
+
+       if (r1->rm_owner != r2->rm_owner)
+               return false;
+       if (r1->rm_startblock + r1->rm_blockcount != r2->rm_startblock)
+               return false;
+       if ((unsigned long long)r1->rm_blockcount + r2->rm_blockcount >
+           XFS_RMAP_LEN_MAX)
+               return false;
+       if (r1->rm_flags != r2->rm_flags)
+               return false;
+       return r1->rm_offset + r1->rm_blockcount == r2->rm_offset;
+}
+
+/* Flag failures for records that could be merged. */
+STATIC void
+xchk_rtrmapbt_check_mergeable(
+       struct xchk_btree               *bs,
+       struct xchk_rtrmap              *cr,
+       const struct xfs_rmap_irec      *irec)
+{
+       if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
+               return;
+
+       if (xchk_rtrmap_mergeable(cr, irec))
+               xchk_btree_set_corrupt(bs->sc, bs->cur, 0);
+
+       memcpy(&cr->prev_rec, irec, sizeof(struct xfs_rmap_irec));
+}
+
+/* Scrub a realtime rmapbt record. */
+STATIC int
+xchk_rtrmapbt_rec(
+       struct xchk_btree               *bs,
+       const union xfs_btree_rec       *rec)
+{
+       struct xchk_rtrmap              *cr = bs->private;
+       struct xfs_rmap_irec            irec;
+
+       if (xfs_rmap_btrec_to_irec(rec, &irec) != NULL ||
+           xfs_rtrmap_check_irec(to_rtg(bs->cur->bc_group), &irec) != NULL) {
+               xchk_btree_set_corrupt(bs->sc, bs->cur, 0);
+               return 0;
+       }
+
+       if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
+               return 0;
+
+       xchk_rtrmapbt_check_mergeable(bs, cr, &irec);
+       xchk_rtrmapbt_check_overlapping(bs, cr, &irec);
+       return 0;
+}
+
+/* Scrub the realtime rmap btree. */
+int
+xchk_rtrmapbt(
+       struct xfs_scrub        *sc)
+{
+       struct xfs_inode        *ip = sc->sr.rtg->rtg_inodes[XFS_RTGI_RMAP];
+       struct xfs_owner_info   oinfo;
+       struct xchk_rtrmap      cr = { };
+       int                     error;
+
+       error = xchk_metadata_inode_forks(sc);
+       if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT))
+               return error;
+
+       xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, XFS_DATA_FORK);
+       return xchk_btree(sc, sc->sr.rmap_cur, xchk_rtrmapbt_rec, &oinfo, &cr);
+}
index 652d347cee9929053019b573b684b59d5a01b8cc..09983899c34164accf613a7b41bf3558ba98a633 100644 (file)
@@ -218,6 +218,8 @@ xchk_teardown(
        int                     error)
 {
        xchk_ag_free(sc, &sc->sa);
+       xchk_rtgroup_btcur_free(&sc->sr);
+
        if (sc->tp) {
                if (error == 0 && (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR))
                        error = xfs_trans_commit(sc->tp);
@@ -458,6 +460,13 @@ static const struct xchk_meta_ops meta_scrub_ops[] = {
                .has    = xfs_has_rtsb,
                .repair = xrep_rgsuperblock,
        },
+       [XFS_SCRUB_TYPE_RTRMAPBT] = {   /* realtime group rmapbt */
+               .type   = ST_RTGROUP,
+               .setup  = xchk_setup_rtrmapbt,
+               .scrub  = xchk_rtrmapbt,
+               .has    = xfs_has_rtrmapbt,
+               .repair = xrep_notsupported,
+       },
 };
 
 static int
index a7fda3e2b013776459cb4efe1c5ac1345148f2a2..7cc3fa31a7d922f10d4da808110d465e9912cdb7 100644 (file)
@@ -126,6 +126,9 @@ struct xchk_rt {
 
        /* XFS_RTGLOCK_* lock state if locked */
        unsigned int            rtlock_flags;
+
+       /* rtgroup btrees */
+       struct xfs_btree_cur    *rmap_cur;
 };
 
 struct xfs_scrub {
@@ -274,10 +277,12 @@ int xchk_metapath(struct xfs_scrub *sc);
 int xchk_rtbitmap(struct xfs_scrub *sc);
 int xchk_rtsummary(struct xfs_scrub *sc);
 int xchk_rgsuperblock(struct xfs_scrub *sc);
+int xchk_rtrmapbt(struct xfs_scrub *sc);
 #else
 # define xchk_rtbitmap         xchk_nothing
 # define xchk_rtsummary                xchk_nothing
 # define xchk_rgsuperblock     xchk_nothing
+# define xchk_rtrmapbt         xchk_nothing
 #endif
 #ifdef CONFIG_XFS_QUOTA
 int xchk_quota(struct xfs_scrub *sc);
index a476c7b2ab75973ba5bd6754bebd7f493181ecf7..eb6bb170c902b3fb5c860e2902eab641a55dd975 100644 (file)
@@ -82,6 +82,7 @@ static const char *name_map[XFS_SCRUB_TYPE_NR] = {
        [XFS_SCRUB_TYPE_DIRTREE]        = "dirtree",
        [XFS_SCRUB_TYPE_METAPATH]       = "metapath",
        [XFS_SCRUB_TYPE_RGSUPER]        = "rgsuper",
+       [XFS_SCRUB_TYPE_RTRMAPBT]       = "rtrmapbt",
 };
 
 /* Format the scrub stats into a text buffer, similar to pcp style. */
index d2ae7e93acb08e82e7b9215a53fdc584c8df69f0..5afc440f22f56ce65d5f7823eeafcb71e4772cef 100644 (file)
@@ -72,6 +72,7 @@ TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_DIRTREE);
 TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_BARRIER);
 TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_METAPATH);
 TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RGSUPER);
+TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RTRMAPBT);
 
 #define XFS_SCRUB_TYPE_STRINGS \
        { XFS_SCRUB_TYPE_PROBE,         "probe" }, \
@@ -105,7 +106,8 @@ TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_RGSUPER);
        { XFS_SCRUB_TYPE_DIRTREE,       "dirtree" }, \
        { XFS_SCRUB_TYPE_BARRIER,       "barrier" }, \
        { XFS_SCRUB_TYPE_METAPATH,      "metapath" }, \
-       { XFS_SCRUB_TYPE_RGSUPER,       "rgsuper" }
+       { XFS_SCRUB_TYPE_RGSUPER,       "rgsuper" }, \
+       { XFS_SCRUB_TYPE_RTRMAPBT,      "rtrmapbt" }
 
 #define XFS_SCRUB_FLAG_STRINGS \
        { XFS_SCRUB_IFLAG_REPAIR,               "repair" }, \