]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
xfs_repair: collect relatime reverse-mapping data for refcount/rmap tree rebuilding
authorDarrick J. Wong <djwong@kernel.org>
Tue, 9 Jan 2024 17:40:19 +0000 (09:40 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 10 Apr 2024 00:21:44 +0000 (17:21 -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 292255ec004921bf2ac7705caf46122245cc479a..3be84ca76905b3c084cea54d4821d2bb3e164a3f 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;
 }