From: Darrick J. Wong <djwong@xxxxxxxxxx> Get rid of two of the static limits, and move the third to the one file that uses it. Signed-off-by: "Darrick J. Wong" <djwong@xxxxxxxxxx> --- fs/xfs/scrub/repair.h | 8 -------- fs/xfs/scrub/newbt.c | 7 +++++++ fs/xfs/scrub/reap.c | 4 ---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/fs/xfs/scrub/repair.h b/fs/xfs/scrub/repair.h index 9c04295742c85f..2bb125c4f9bf2b 100644 --- a/fs/xfs/scrub/repair.h +++ b/fs/xfs/scrub/repair.h @@ -18,14 +18,6 @@ static inline int xrep_notsupported(struct xfs_scrub *sc) #ifdef CONFIG_XFS_ONLINE_REPAIR -/* - * This is the maximum number of deferred extent freeing item extents (EFIs) - * that we'll attach to a transaction without rolling the transaction to avoid - * overrunning a tr_itruncate reservation. - */ -#define XREP_MAX_ITRUNCATE_EFIS (128) - - /* Repair helpers */ int xrep_attempt(struct xfs_scrub *sc, struct xchk_stats_run *run); diff --git a/fs/xfs/scrub/newbt.c b/fs/xfs/scrub/newbt.c index 1588ce971cb8e1..f00ec278fdc53e 100644 --- a/fs/xfs/scrub/newbt.c +++ b/fs/xfs/scrub/newbt.c @@ -27,6 +27,13 @@ #include "scrub/repair.h" #include "scrub/newbt.h" +/* + * This is the maximum number of deferred extent freeing item extents (EFIs) + * that we'll attach to a transaction without rolling the transaction to avoid + * overrunning a tr_itruncate reservation. + */ +#define XREP_MAX_ITRUNCATE_EFIS (128) + /* * Estimate proper slack values for a btree that's being reloaded. * diff --git a/fs/xfs/scrub/reap.c b/fs/xfs/scrub/reap.c index d58fd57aaebb43..82910188111dd7 100644 --- a/fs/xfs/scrub/reap.c +++ b/fs/xfs/scrub/reap.c @@ -171,8 +171,6 @@ static inline bool xreap_is_dirty(const struct xreap_state *rs) return rs->nr_binval > 0 || rs->nr_deferred > 0; } -#define XREAP_MAX_BINVAL (2048) - /* * Decide if we need to roll the transaction to clear out the the log * reservation that we allocated to buffer invalidations. @@ -198,8 +196,6 @@ static inline bool xreap_inc_binval(struct xreap_state *rs) return rs->nr_binval < rs->max_binval; } -#define XREAP_MAX_DEFER_CHAIN (2048) - /* * Decide if we want to finish the deferred ops that are attached to the scrub * transaction. We don't want to queue huge chains of deferred ops because