diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-09-26 13:41:35 -0400 |
---|---|---|
committer | Eric Sandeen <sandeen@redhat.com> | 2019-09-26 13:41:35 -0400 |
commit | 8dd3922c425e3036cebe53bbcd73aec971983d5e (patch) | |
tree | 7e86f7a3f68a33adb9c2c3ccb7fd2db6a354f3f2 | |
parent | 5ef3b66a74ee6934ff85f838170cf47edb8d133c (diff) | |
download | xfsprogs-dev-8dd3922c425e3036cebe53bbcd73aec971983d5e.tar.gz |
libfrog: add online scrub/repair for superblock counters
Wire up the new superblock summary counter ioctls.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r-- | libfrog/scrub.c | 6 | ||||
-rw-r--r-- | libfrog/scrub.h | 7 | ||||
-rw-r--r-- | scrub/scrub.c | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/libfrog/scrub.c b/libfrog/scrub.c index 12c0926fbc..e9671da2b7 100644 --- a/libfrog/scrub.c +++ b/libfrog/scrub.c @@ -129,6 +129,12 @@ const struct xfrog_scrub_descr xfrog_scrubbers[XFS_SCRUB_TYPE_NR] = { .descr = "project quotas", .type = XFROG_SCRUB_TYPE_FS, }, + [XFS_SCRUB_TYPE_FSCOUNTERS] = { + .name = "fscounters", + .descr = "filesystem summary counters", + .type = XFROG_SCRUB_TYPE_FS, + .flags = XFROG_SCRUB_DESCR_SUMMARY, + }, }; int diff --git a/libfrog/scrub.h b/libfrog/scrub.h index 6fda8975fb..e43d8c244e 100644 --- a/libfrog/scrub.h +++ b/libfrog/scrub.h @@ -20,8 +20,15 @@ struct xfrog_scrub_descr { const char *name; const char *descr; enum xfrog_scrub_type type; + unsigned int flags; }; +/* + * The type of metadata checked by this scrubber is a summary of other types + * of metadata. This scrubber should be run after all the others. + */ +#define XFROG_SCRUB_DESCR_SUMMARY (1 << 0) + extern const struct xfrog_scrub_descr xfrog_scrubbers[XFS_SCRUB_TYPE_NR]; int xfrog_scrub_metadata(struct xfs_fd *xfd, struct xfs_scrub_metadata *meta); diff --git a/scrub/scrub.c b/scrub/scrub.c index 153d29d55c..083ed9a1b7 100644 --- a/scrub/scrub.c +++ b/scrub/scrub.c @@ -293,6 +293,8 @@ xfs_scrub_metadata( for (type = 0; type < XFS_SCRUB_TYPE_NR; type++, sc++) { if (sc->type != scrub_type) continue; + if (sc->flags & XFROG_SCRUB_DESCR_SUMMARY) + continue; meta.sm_type = type; meta.sm_flags = 0; |