]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: fix rmapbt record order check
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)
commitdb2a77d1d263b3e167dbe022b19ad9da7c447dda
tree66a3735e599e1b15b4f3c57a86d37597c8caaf27
parent2a0f9efe03aed1ec0b2c6a45ba9472646848c02f
xfs_repair: fix rmapbt record order check

The rmapbt record order checks here don't quite work properly.  For
non-shared filesystems, we fail to check that the startblock of the nth
record comes entirely after the previous record.

However, for filesystems with shared blocks (reflink) we correctly check
that the startblock/owner/offset of the nth record comes after the
previous one.

Therefore, make the reflink fs checks use "laststartblock" to preserve
that functionality while making the non-reflink fs checks use
"lastblock" to fix the problem outlined above.

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