]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs_bmap.c
xfs: compute absolute maximum nlevels for each btree type
authorDarrick J. Wong <djwong@kernel.org>
Thu, 28 Apr 2022 19:39:03 +0000 (15:39 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 28 Apr 2022 19:39:03 +0000 (15:39 -0400)
commit441815c7820d51207d2567a15dd1d3686aa79685
tree646feaaa7b12eb2421ff82da357592dec855038c
parentc967ee0a69cdcc2c252eb29236a7b5980f1b7886
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: Eric Sandeen <sandeen@sandeen.net>
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