]> 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>
Tue, 9 Jul 2024 22:37:20 +0000 (15:37 -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 1f1f028ba35655d8d4f4b34df2d25f6124fa266f..63b5a49e5e80e74dcda0baa180d64008ab989d90 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;
 }