]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: throw away totally bad clusters
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 30 Sep 2020 14:59:05 +0000 (10:59 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 30 Sep 2020 14:59:05 +0000 (10:59 -0400)
commit07e068f9413b95bc68c5131dcfb7fcdf7a04b107
tree1837ecc9998c61091368b05af84bd9f0925884d6
parent36669577e82c51347df3565317416e2ab77f204f
xfs_repair: throw away totally bad clusters

If the filesystem supports sparse inodes, we detect that an entire
cluster buffer has no detectable inodes at all, and we can easily mark
that part of the inode chunk sparse, just drop the cluster buffer and
forget about it.  This makes repair less likely to go to great lengths
to try to save something that's totally unsalvageable.

This manifested in recs[2].free=zeroes in xfs/364, wherein the root
directory claimed to own block X and the inobt also claimed that X was
inodes; repair tried to create rmaps for both owners, and then the whole
mess blew up because the rmap code aborts on those kinds of anomalies.

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