]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: compute absolute maximum nlevels for each btree type
authorDarrick J. Wong <djwong@kernel.org>
Thu, 6 Jan 2022 22:13:22 +0000 (14:13 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 20 Jan 2022 00:02:53 +0000 (16:02 -0800)
commit57c053d4a01c4edb14bf872aabe1c933ed9f103e
tree181883de45b78aa23af244324b18cce7b31f42e9
parent9b02bf4dd4e65a78465979a00508d9e6233f26a9
xfs: compute absolute maximum nlevels for each btree type

Source kernel commit: 0ed5f7356daee74244b02e100b3cc043e886e686

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>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
14 files changed:
libxfs/xfs_alloc.c
libxfs/xfs_alloc_btree.c
libxfs/xfs_alloc_btree.h
libxfs/xfs_bmap.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_bmap_btree.h
libxfs/xfs_fs.h
libxfs/xfs_ialloc.c
libxfs/xfs_ialloc_btree.c
libxfs/xfs_ialloc_btree.h
libxfs/xfs_refcount_btree.c
libxfs/xfs_refcount_btree.h
libxfs/xfs_rmap_btree.c
libxfs/xfs_rmap_btree.h