mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
bc8883eb77
commit
0ed5f7356d
14 changed files with 203 additions and 17 deletions
|
@ -2793,6 +2793,7 @@ xfs_ialloc_setup_geometry(
|
|||
inodes = (1LL << XFS_INO_AGINO_BITS(mp)) >> XFS_INODES_PER_CHUNK_LOG;
|
||||
igeo->inobt_maxlevels = xfs_btree_compute_maxlevels(igeo->inobt_mnr,
|
||||
inodes);
|
||||
ASSERT(igeo->inobt_maxlevels <= xfs_iallocbt_maxlevels_ondisk());
|
||||
|
||||
/*
|
||||
* Set the maximum inode count for this filesystem, being careful not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue