]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: fix off by one error when rebuilding high keys
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 28 Jan 2019 19:03:11 +0000 (13:03 -0600)
committerEric Sandeen <sandeen@redhat.com>
Mon, 28 Jan 2019 19:03:11 +0000 (13:03 -0600)
commit0ba6dae9f86f7c02e88d8846234f497e1cde3aa9
tree2c72601ca03f6ae6f5f1c9d9f06ee80e9c672469
parentb136f48b19a5b8e788aceb4b80e97d6ae9edd0ea
xfs_repair: fix off by one error when rebuilding high keys

Fix an off-by-one error when scanning a rmap btree block for high keys
as part of rebuilding rmap btrees during phase 5.  This causes
xfs_repair to emit a corrupt filesystem, which is bad.

This can be reproduced pretty easily by exporting
TEST_XFS_REPAIR_REBUILD=1 and running generic/051 with a 1k block size.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase5.c