]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: always check realtime file mappings against incore info
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:22:24 +0000 (14:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 31 Jul 2024 01:46:56 +0000 (18:46 -0700)
commit454cbb083e8fcfa3d94e80deae873444e620901c
treeb4b5b47b1bfaa7f151975f12a458121fad0cbad9
parent50910827d8c9fa05d88e64339568a866860d717e
xfs_repair: always check realtime file mappings against incore info

Curiously, the xfs_repair code that processes data fork mappings of
realtime files doesn't actually compare the mappings against the incore
state map during the !check_dups phase (aka phase 3).  As a result, we
lose the opportunity to clear damaged realtime data forks before we get
to crosslinked file checking in phase 4, which results in ondisk
metadata errors calling do_error, which aborts repair.

Split the process_rt_rec_state code into two functions: one to check the
mapping, and another to update the incore state.  The first one can be
called to help us decide if we're going to zap the fork, and the second
one updates the incore state if we decide to keep the fork.  We already
do this for regular data files.

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