The bnobt and refcountbt scanners attempt to check that records are in
the correct order. However, the lastblock variable in both functions
ought to be set to the end of the previous record (instead of the start)
because otherwise we fail to catch overlapping records, which are not
allowed in either btree type.
Found by running xfs/410 with recs[1].blockcount = middlebit.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
"out-of-order bno btree record %d (%u %u) block %u/%u\n"),
i, b, len, agno, bno);
} else {
- lastblock = b;
+ lastblock = end - 1;
}
} else {
agcnts->fdblocks += len;
"out-of-order %s btree record %d (%u %u) block %u/%u\n"),
name, i, b, len, agno, bno);
} else {
- lastblock = b;
+ lastblock = end - 1;
}
/* Is this record mergeable with the last one? */