xfs: don't track firstrec/firstkey separately in xchk_btree
authorDarrick J. Wong <djwong@kernel.org>
Wed, 22 Sep 2021 16:28:53 +0000 (09:28 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 19 Oct 2021 18:45:14 +0000 (11:45 -0700)
commitd47fef9342d0c322f69695a0eb2e2a643575b66d
treeb11feb92d7871885d1f16d5229033e7bbf6aac80
parentefb79ea31067ae3dd0f348eb06e6b9a5e9907078
xfs: don't track firstrec/firstkey separately in xchk_btree

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>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/btree.c
fs/xfs/scrub/btree.h