Re: [PATCH 03/15] xfs: don't track firstrec/firstkey separately in xchk_btree
From: Dave Chinner <david@fromorbit.com>
Date: 2021-10-13 01:03:00
From: Dave Chinner <david@fromorbit.com>
Date: 2021-10-13 01:03:00
On Tue, Oct 12, 2021 at 04:32:50PM -0700, Darrick J. Wong wrote:
From: Darrick J. Wong <djwong@kernel.org> The btree scrubbing code checks that the records (or keys) that it finds in a btree block are all in order by calling the btree cursor's ->recs_inorder function. This of course makes no sense for the first item in the block, so we switch that off with a separate variable in struct xchk_btree. Christoph helped me figure out that the variable is unnecessary, since we just accessed bc_ptrs[level] and can compare that against zero. Use that, and save ourselves some memory space. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Yup, took a little bit of reading to work it out, but it looks correct. Reviewed-by: Dave Chinner <redacted> -- Dave Chinner david@fromorbit.com