]> 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)
commit521c02e8548155b8381a11cfc005b434793557d9
tree055315da53845a0697ca6f018e6cbb21badd8ce7
parent18ffc4ae7915230f33986b2170c4bccfb38bc219
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