diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:06:28 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-11-09 19:07:33 -0800 |
commit | fb3e7e3d35d304b8388654427e30f1a2663a22e8 (patch) | |
tree | f61c3e97807f8db0bdbc5d187091955001507f63 /fs/xfs/scrub | |
parent | 092dcaf49b57c7da4a38fa9eeffe0e914a20e037 (diff) |
xfs: remove XCHK_REAPING_DISABLED from scrub
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@kernel.org>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/common.c | 26 | ||||
-rw-r--r-- | fs/xfs/scrub/common.h | 2 | ||||
-rw-r--r-- | fs/xfs/scrub/scrub.c | 2 | ||||
-rw-r--r-- | fs/xfs/scrub/scrub.h | 3 | ||||
-rw-r--r-- | fs/xfs/scrub/trace.h | 1 |
5 files changed, 1 insertions, 33 deletions
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index 072a55c64301..bc7aced30d5a 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -1225,32 +1225,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 c0e08f4da247..2b35a537c2f6 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 4ddc16ead51f..50fc4cf6bf0d 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" }, \ |