summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_alloc_btree.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-09-23 10:32:06 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-10-19 11:45:16 -0700
commit0ed5f7356daee74244b02e100b3cc043e886e686 (patch)
tree12bc85f663f6be62fff23c583309bcd0bf0c1237 /fs/xfs/libxfs/xfs_alloc_btree.h
parentbc8883eb775dd18d8b84733d8b3a3955b72d103a (diff)
xfs: compute absolute maximum nlevels for each btree type
Add code for all five btree types so that we can compute the absolute maximum possible btree height for each btree type. This is a setup for the next patch, which makes every btree type have its own cursor cache. The functions are exported so that we can have xfs_db report the absolute maximum btree heights for each btree type, rather than making everyone run their own ad-hoc computations. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc_btree.h')
-rw-r--r--fs/xfs/libxfs/xfs_alloc_btree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc_btree.h b/fs/xfs/libxfs/xfs_alloc_btree.h
index 2f6b816aaf9f..c715bee5ae90 100644
--- a/fs/xfs/libxfs/xfs_alloc_btree.h
+++ b/fs/xfs/libxfs/xfs_alloc_btree.h
@@ -60,4 +60,6 @@ extern xfs_extlen_t xfs_allocbt_calc_size(struct xfs_mount *mp,
void xfs_allocbt_commit_staged_btree(struct xfs_btree_cur *cur,
struct xfs_trans *tp, struct xfs_buf *agbp);
+unsigned int xfs_allocbt_maxlevels_ondisk(void);
+
#endif /* __XFS_ALLOC_BTREE_H__ */