]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: dynamically allocate cursors based on maxlevels
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Sep 2021 19:27:24 +0000 (12:27 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 19 Oct 2021 18:45:15 +0000 (11:45 -0700)
commit930a93a34a25200a3d9090311faba5721a36ff4e
treef02e9ba660f9fe2b33b0a6b7080e437c5a2c6b87
parent4e894016289a91e61a5a94b8bb8c7b79d3690200
xfs: dynamically allocate cursors based on maxlevels

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