]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: truncate and unmark orphaned metadata inodes
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:21:55 +0000 (14:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 1 Aug 2024 00:07:31 +0000 (17:07 -0700)
commit47c68d7b2a3353f9b6f641bc7d628ce7a2f26de0
treeb61e130d312439cda43a80c4eb112607cba7dbcd
parenta9f2384d7c75bc957de6f525c025dd0ec8fd622f
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