]> 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>
Sun, 11 Aug 2024 06:35:55 +0000 (08:35 +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 9d11eef5e0b47e62b6519614104e143a275e9eb8..6ef0e3813c3e0d0f81ff26d9e1156c1b0f021dd6 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;
 }