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>
.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
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);
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;