diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-16 22:26:56 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-19 21:45:15 +0300 |
commit | c0643f6fdd6d3c448142ed1492a9a6b6505f9afb (patch) | |
tree | ec9f193ce040806f38b138c6fcc2c11c0dd82b6f /fs/xfs/libxfs/xfs_btree.c | |
parent | 56370ea6e5fe3e3d6e1ca2da58f95fb0d5e1779f (diff) | |
download | linux-c0643f6fdd6d3c448142ed1492a9a6b6505f9afb.tar.xz |
xfs: encode the max btree height in the cursor
Encode the maximum btree height in the cursor, since we're soon going to
allow smaller cursors for AG btrees and larger cursors for file btrees.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index 25dfab81025f..6ced8f028d47 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -2933,7 +2933,7 @@ xfs_btree_new_iroot( be16_add_cpu(&block->bb_level, 1); xfs_btree_set_numrecs(block, 1); cur->bc_nlevels++; - ASSERT(cur->bc_nlevels <= XFS_BTREE_MAXLEVELS); + ASSERT(cur->bc_nlevels <= cur->bc_maxlevels); cur->bc_levels[level + 1].ptr = 1; kp = xfs_btree_key_addr(cur, 1, block); @@ -3097,7 +3097,7 @@ xfs_btree_new_root( xfs_btree_setbuf(cur, cur->bc_nlevels, nbp); cur->bc_levels[cur->bc_nlevels].ptr = nptr; cur->bc_nlevels++; - ASSERT(cur->bc_nlevels <= XFS_BTREE_MAXLEVELS); + ASSERT(cur->bc_nlevels <= cur->bc_maxlevels); *stat = 1; return 0; error0: |