]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_repair: collect realtime reverse-mapping data for refcount/rmap tree rebuilding
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:22:23 +0000 (14:22 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 31 Jul 2024 01:46:56 +0000 (18:46 -0700)
Collect reverse-mapping data for realtime files so that we can later
check and rebuild the reference count tree and the reverse mapping
tree.

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

index 43029133b92461ffab58b7f36323ddacae40fef0..5c853a68d696b30ff0c98fca3def0f8986a3b716 100644 (file)
@@ -350,6 +350,10 @@ _("inode %" PRIu64 " - bad rt extent overflows - start %" PRIu64 ", "
         */
        *tot += irec->br_blockcount;
 
+       /* Record mapping data for the realtime rmap. */
+       if (collect_rmaps && !zap_metadata && !check_dups)
+               rmap_add_rec(mp, ino, XFS_DATA_FORK, irec, true);
+
        return 0;
 }