]> 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)
committerChristoph Hellwig <hch@lst.de>
Mon, 12 Aug 2024 11:53:50 +0000 (13:53 +0200)
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 445300875240fc72271e7b13eb12def290e6e12b..5ca4c4bebe1b57b6bb8b492d2046b40f0bd066fd 100644 (file)
@@ -364,6 +364,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;
 }