diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-16 21:26:56 +0200 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-19 20:45:15 +0200 |
commit | c0643f6fdd6d3c448142ed1492a9a6b6505f9afb (patch) | |
tree | ec9f193ce040806f38b138c6fcc2c11c0dd82b6f /fs/xfs/libxfs/xfs_btree.h | |
parent | xfs: refactor btree cursor allocation function (diff) | |
download | linux-c0643f6fdd6d3c448142ed1492a9a6b6505f9afb.tar.xz linux-c0643f6fdd6d3c448142ed1492a9a6b6505f9afb.zip |
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.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h index 8e78ede87b16..ed0b7d5ab3a3 100644 --- a/fs/xfs/libxfs/xfs_btree.h +++ b/fs/xfs/libxfs/xfs_btree.h @@ -238,6 +238,7 @@ struct xfs_btree_cur xfs_btnum_t bc_btnum; /* identifies which btree type */ union xfs_btree_irec bc_rec; /* current insert/search record value */ uint8_t bc_nlevels; /* number of levels in the tree */ + uint8_t bc_maxlevels; /* maximum levels for this btree type */ int bc_statoff; /* offset of btree stats array */ /* @@ -590,6 +591,7 @@ xfs_btree_alloc_cursor( cur->bc_tp = tp; cur->bc_mp = mp; cur->bc_btnum = btnum; + cur->bc_maxlevels = XFS_BTREE_MAXLEVELS; return cur; } |