From: Darrick J. Wong <djwong@xxxxxxxxxx> Nobody uses this code anymore, so get rid of it. It was racy with regards to freezes and remounts anyway. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/scrub/common.c | 26 -------------------------- fs/xfs/scrub/common.h | 2 -- fs/xfs/scrub/scrub.c | 2 -- fs/xfs/scrub/scrub.h | 3 +-- fs/xfs/scrub/trace.h | 1 - 5 files changed, 1 insertion(+), 33 deletions(-) diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index ef2dd59d0ac9..d96355ca4175 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -1239,32 +1239,6 @@ xchk_metadata_inode_forks( return 0; } -/* Pause background reaping of resources. */ -void -xchk_stop_reaping( - struct xfs_scrub *sc) -{ - sc->flags |= XCHK_REAPING_DISABLED; - xfs_blockgc_stop(sc->mp); - xfs_inodegc_stop(sc->mp); -} - -/* Restart background reaping of resources. */ -void -xchk_start_reaping( - struct xfs_scrub *sc) -{ - /* - * Readonly filesystems do not perform inactivation or speculative - * preallocation, so there's no need to restart the workers. - */ - if (!xfs_is_readonly(sc->mp)) { - xfs_inodegc_start(sc->mp); - xfs_blockgc_start(sc->mp); - } - sc->flags &= ~XCHK_REAPING_DISABLED; -} - /* * Enable filesystem hooks (i.e. runtime code patching) before starting a scrub * operation. Callers must not hold any locks that intersect with the CPU diff --git a/fs/xfs/scrub/common.h b/fs/xfs/scrub/common.h index 45318bd5678d..6992e3db5f11 100644 --- a/fs/xfs/scrub/common.h +++ b/fs/xfs/scrub/common.h @@ -213,8 +213,6 @@ static inline bool xchk_could_repair(const struct xfs_scrub *sc) #endif /* CONFIG_XFS_ONLINE_REPAIR */ int xchk_metadata_inode_forks(struct xfs_scrub *sc); -void xchk_stop_reaping(struct xfs_scrub *sc); -void xchk_start_reaping(struct xfs_scrub *sc); /* * Setting up a hook to wait for intents to drain is costly -- we have to take diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index 6728b1409fea..4ec9ff259c5e 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c @@ -191,8 +191,6 @@ xchk_teardown( sc->flags &= ~XCHK_HAVE_FREEZE_PROT; mnt_drop_write_file(sc->file); } - if (sc->flags & XCHK_REAPING_DISABLED) - xchk_start_reaping(sc); if (sc->xfile) { xfile_destroy(sc->xfile); sc->xfile = NULL; diff --git a/fs/xfs/scrub/scrub.h b/fs/xfs/scrub/scrub.h index 12d1ba2aa83b..04afb584f504 100644 --- a/fs/xfs/scrub/scrub.h +++ b/fs/xfs/scrub/scrub.h @@ -118,12 +118,11 @@ struct xfs_scrub { /* XCHK state flags grow up from zero, XREP state flags grown down from 2^31 */ #define XCHK_TRY_HARDER (1 << 0) /* can't get resources, try again */ -#define XCHK_REAPING_DISABLED (1 << 1) /* background block reaping paused */ +#define XCHK_HAVE_FREEZE_PROT (1 << 1) /* do we have freeze protection? */ #define XCHK_FSHOOKS_DRAIN (1 << 2) /* defer ops draining enabled */ #define XCHK_NEED_DRAIN (1 << 3) /* scrub needs to use intent drain */ #define XCHK_FSHOOKS_QUOTA (1 << 4) /* quota live update enabled */ #define XCHK_FSHOOKS_NLINKS (1 << 5) /* link count live update enabled */ -#define XCHK_HAVE_FREEZE_PROT (1 << 6) /* do we have freeze protection? */ #define XREP_RESET_PERAG_RESV (1 << 30) /* must reset AG space reservation */ #define XREP_ALREADY_FIXED (1 << 31) /* checking our repair work */ diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h index 19b2d569d0c8..e0de12c4fcf4 100644 --- a/fs/xfs/scrub/trace.h +++ b/fs/xfs/scrub/trace.h @@ -114,7 +114,6 @@ TRACE_DEFINE_ENUM(XFS_SCRUB_TYPE_HEALTHY); #define XFS_SCRUB_STATE_STRINGS \ { XCHK_TRY_HARDER, "try_harder" }, \ { XCHK_HAVE_FREEZE_PROT, "nofreeze" }, \ - { XCHK_REAPING_DISABLED, "reaping_disabled" }, \ { XCHK_FSHOOKS_DRAIN, "fshooks_drain" }, \ { XCHK_NEED_DRAIN, "need_drain" }, \ { XCHK_FSHOOKS_QUOTA, "fshooks_quota" }, \