]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: fix bnobt and refcountbt record order checks
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 10 Jul 2020 19:35:45 +0000 (15:35 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 10 Jul 2020 19:35:45 +0000 (15:35 -0400)
commit2212e773d0f8ae1424b80e46e2865d2f02b0e183
tree3f2bb10b0cfb7ddb4ecb903666445d0e189ad388
parentcae4fd291266c32441c6a7fcca49929fe11c391c
xfs_repair: fix bnobt and refcountbt record order checks

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>
repair/scan.c