]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: dynamically allocate cursors based on maxlevels
authorDarrick J. Wong <djwong@kernel.org>
Thu, 6 Jan 2022 22:13:20 +0000 (14:13 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 20 Jan 2022 00:02:52 +0000 (16:02 -0800)
commitd7d0dfc05d10229f214c057992dd640a12e672f8
tree362cac780d939f1fd267be363d7ee498a5d467dc
parentae3eafec869043957a803b86a4bc777e76697331
xfs: dynamically allocate cursors based on maxlevels

Source kernel commit: c940a0c54a2e9333478f1d87ed40006a04fcec7e

To support future btree code, we need to be able to size btree cursors
dynamically for very large btrees.  Switch the maxlevels computation to
use the precomputed values in the superblock, and create cursors that
can handle a certain height.  For now, we retain the btree cursor cache
that can handle up to 9-level btrees, though a subsequent patch
introduces separate caches for each btree type, where each cache's
objects will be exactly tall enough to handle the specific btree type.

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>
libxfs/xfs_alloc_btree.c
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.h
libxfs/xfs_ialloc_btree.c
libxfs/xfs_refcount_btree.c
libxfs/xfs_rmap_btree.c