diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-10-25 17:14:32 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-10-26 18:32:12 -0700 |
commit | 28ba8668d5591ca9ed0e511c4fd8f2e234b27f4b (patch) | |
tree | c31aa2dcf085af8fcf77ebaaa0d664babd126e51 /fs/xfs/scrub/repair.c | |
parent | 6c345675d72f4c8450f61d71e61ff516271176a4 (diff) |
xfs: add debug knobs to control btree bulk load slack factors
Add some debug knobs so that we can control the leaf and node block
slack when rebuilding btrees.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/repair.c')
-rw-r--r-- | fs/xfs/scrub/repair.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index a10fec209cdc..8d6ea2641c05 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c @@ -655,9 +655,13 @@ xrep_bload_estimate_slack( uint64_t free; uint64_t sz; - /* Let the btree code compute the default slack values. */ - bload->leaf_slack = -1; - bload->node_slack = -1; + /* + * The xfs_globals values are set to -1 (i.e. take the bload defaults) + * unless someone has set them otherwise, so we just pull the values + * here. + */ + bload->leaf_slack = xfs_globals.bload_leaf_slack; + bload->node_slack = xfs_globals.bload_node_slack; if (sc->ops->type == ST_PERAG) { free = sc->sa.pag->pagf_freeblks; |