summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/scrub.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-01-16 10:12:15 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-02-04 09:31:16 -0800
commitf682212445cbba9cfb31f476bd353d35ddc0afef (patch)
tree025cef5d453eb46a92f4a46848d396104076b72c /fs/xfs/scrub/scrub.c
parente0454bb62553090a238078211771ee52af738811 (diff)
xfs: add online scrub/repair for superblock countersrepair-part-two_2019-02-04djwong-experimental_2019-02-04
Teach online scrub and repair how to check and reset the superblock inode and block counters. The AG rebuilding functions will need these to adjust the counts if they need to change as a part of recovering from corruption. We must use the repair freeze mechanism to prevent any other changes while we do this. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/scrub.c')
-rw-r--r--fs/xfs/scrub/scrub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c
index 59a234f71ff2..943dbec82d60 100644
--- a/fs/xfs/scrub/scrub.c
+++ b/fs/xfs/scrub/scrub.c
@@ -355,6 +355,12 @@ static const struct xchk_meta_ops meta_scrub_ops[] = {
.scrub = xchk_quota,
.repair = xrep_quota,
},
+ [XFS_SCRUB_TYPE_FSCOUNTERS] = { /* fs summary counters */
+ .type = ST_FS,
+ .setup = xchk_setup_fscounters,
+ .scrub = xchk_fscounters,
+ .repair = xrep_fscounters,
+ },
};
/* This isn't a stable feature, warn once per day. */