Re: [PATCH 03/15] xfs: don't track firstrec/firstkey separately in xchk_btree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 12, 2021 at 04:32:50PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

Yup, took a little bit of reading to work it out, but it looks
correct.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux