• Darrick J. Wong's avatar
    xfs: don't track firstrec/firstkey separately in xchk_btree · d47fef93
    Darrick J. Wong authored
    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: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    d47fef93
btree.c 19 KB