]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: only update in-core extent state after scanning full extent
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 23 May 2018 21:30:48 +0000 (16:30 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 23 May 2018 21:30:48 +0000 (16:30 -0500)
commitbf67850796607118634be6dfbccf70ae3d604b28
tree9f983fe2c544731170d5c90b6b6ae4ccd2fa9f85
parentf9c559f4e4fb4587b3090d63385d6cbed760d3a8
xfs_repair: only update in-core extent state after scanning full extent

In process_bmbt_reclist_int, only update the in-core extent state after
clearing the entire extent for conflicts.  If we encounter conflicts
we'll try rebuilding the fork from rmap data and rescanning the fork.
It is essential to avoid polluting the in-memory state with garbage
data so that we don't end up nuking other files needlessly.  Found by
fuzzing recs[1].blockcount = middlebit in xfs/380.

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/dinode.c