summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_globals.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2023-12-15 10:03:28 -0800
committerDarrick J. Wong <djwong@kernel.org>2023-12-15 10:03:28 -0800
commita20ffa7d9f863056364b11a680145a76ef15acb2 (patch)
tree00ab783203807baf47edfa2f5cfd33cffb6c366d /fs/xfs/xfs_globals.c
parent26de64629d8b439a03bce243f14a46f7440729f3 (diff)
downloadlinux-a20ffa7d9f863056364b11a680145a76ef15acb2.tar.gz
linux-a20ffa7d9f863056364b11a680145a76ef15acb2.tar.bz2
linux-a20ffa7d9f863056364b11a680145a76ef15acb2.zip
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. For developers, it might be useful to construct btrees of various heights by crafting a filesystem with a certain number of records and then using repair+knobs to rebuild the index with a certain shape. Practically speaking, you'd only ever do that for extreme stress testing of the runtime code or the btree generator. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_globals.c')
-rw-r--r--fs/xfs/xfs_globals.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/xfs_globals.c b/fs/xfs/xfs_globals.c
index 9edc1f2bc939..f18fec0adf66 100644
--- a/fs/xfs/xfs_globals.c
+++ b/fs/xfs/xfs_globals.c
@@ -44,4 +44,16 @@ struct xfs_globals xfs_globals = {
.pwork_threads = -1, /* automatic thread detection */
.larp = false, /* log attribute replay */
#endif
+
+ /*
+ * Leave this many record slots empty when bulk loading btrees. By
+ * default we load new btree leaf blocks 75% full.
+ */
+ .bload_leaf_slack = -1,
+
+ /*
+ * Leave this many key/ptr slots empty when bulk loading btrees. By
+ * default we load new btree node blocks 75% full.
+ */
+ .bload_node_slack = -1,
};