diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-16 12:27:24 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-19 11:45:15 -0700 |
commit | c940a0c54a2e9333478f1d87ed40006a04fcec7e (patch) | |
tree | f02e9ba660f9fe2b33b0a6b7080e437c5a2c6b87 /fs/xfs/xfs_super.c | |
parent | c0643f6fdd6d3c448142ed1492a9a6b6505f9afb (diff) |
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>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r-- | fs/xfs/xfs_super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index 30bae0657343..2a535a8bc3c0 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1966,8 +1966,8 @@ xfs_init_zones(void) goto out_destroy_log_ticket_zone; xfs_btree_cur_zone = kmem_cache_create("xfs_btree_cur", - xfs_btree_cur_sizeof(XFS_BTREE_MAXLEVELS), - 0, 0, NULL); + xfs_btree_cur_sizeof(XFS_BTREE_CUR_CACHE_MAXLEVELS), + 0, 0, NULL); if (!xfs_btree_cur_zone) goto out_destroy_bmap_free_item_zone; |