]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: dynamically allocate btree scrub context structure
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Sep 2021 19:21:55 +0000 (12:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 19 Oct 2021 18:45:14 +0000 (11:45 -0700)
commit57853c5c5cd89a37979eb91bb6107d71523730fb
tree055315da53845a0697ca6f018e6cbb21badd8ce7
parent877a91744adbf7fd4a78c095bd60372cd7932de4
xfs: dynamically allocate btree scrub context structure

Reorganize struct xchk_btree so that we can dynamically size the context
structure to fit the type of btree cursor that we have.  This will
enable us to use memory more efficiently once we start adding very tall
btree types.  Right-size the lastkey array to match the number of *node*
levels in the tree so that we stop wasting space.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/btree.c
fs/xfs/scrub/btree.h