diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 10:44:32 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-09-17 18:54:51 -0700 |
commit | 940980c0abbf887a4c7a64cc5bfec3d036907b11 (patch) | |
tree | 95bfb26ef82b005b966e7fe24f7e2334383281a4 /fs/xfs/scrub/scrub.c | |
parent | 623ceec2324c375582b2b819a1b1daa5ea006ae7 (diff) |
xfs: implement online scrubbing of rtsummary infoscrub-rtsummary_2021-09-17
Finish the realtime summary scrubber by adding the functions we need to
compute a fresh copy of the rtsummary info and comparing it to the copy
on disk.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/scrub.c')
-rw-r--r-- | fs/xfs/scrub/scrub.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index 6381cbb5fad2..7d1837bc997d 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c @@ -24,6 +24,7 @@ #include "scrub/trace.h" #include "scrub/repair.h" #include "scrub/health.h" +#include "scrub/xfile.h" /* * Online Scrub and Repair @@ -175,6 +176,10 @@ xchk_teardown( mutex_unlock(&sc->mp->m_quotainfo->qi_quotaofflock); sc->flags &= ~XCHK_HAS_QUOTAOFFLOCK; } + if (sc->xfile) { + xfile_destroy(sc->xfile); + sc->xfile = NULL; + } if (sc->buf) { kmem_free(sc->buf); sc->buf = NULL; @@ -304,14 +309,14 @@ static const struct xchk_meta_ops meta_scrub_ops[] = { }, [XFS_SCRUB_TYPE_RTBITMAP] = { /* realtime bitmap */ .type = ST_FS, - .setup = xchk_setup_rt, + .setup = xchk_setup_rtbitmap, .scrub = xchk_rtbitmap, .has = xfs_has_realtime, .repair = xrep_notsupported, }, [XFS_SCRUB_TYPE_RTSUM] = { /* realtime summary */ .type = ST_FS, - .setup = xchk_setup_rt, + .setup = xchk_setup_rtsummary, .scrub = xchk_rtsummary, .has = xfs_has_realtime, .repair = xrep_notsupported, |