]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: truncate and unmark orphaned metadata inodes
authorDarrick J. Wong <djwong@kernel.org>
Tue, 15 Oct 2024 19:44:05 +0000 (12:44 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 1 Nov 2024 20:44:48 +0000 (13:44 -0700)
commit8c69a423785c2387ffe55c1a01fbdf2a8bdf043f
tree09c18200d37f1908d43f9aa9f0c34147b280aee5
parentc7e6273499265a631cdecac7434faec6cfa47b60
xfs_repair: truncate and unmark orphaned metadata inodes

If an inode claims to be a metadata inode but wasn't linked in either
directory tree, remove the attr fork and reset the data fork if the
contents weren't regular extent mappings before moving the inode to the
lost+found.

We don't ifree the inode, because it's possible that the inode was not
actually a metadata inode but simply got corrupted due to bitflips or
something, and we'd rather let the sysadmin examine what's left of the
file instead of photorec'ing it.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
repair/phase6.c