From 99ffb292fecce6f6b3a1d244f12665c4ee5f0bf5 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 3 Jul 2024 14:22:23 -0700 Subject: [PATCH] xfs_repair: collect realtime reverse-mapping data for refcount/rmap tree rebuilding 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 --- repair/dinode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repair/dinode.c b/repair/dinode.c index 43029133b..5c853a68d 100644 --- a/repair/dinode.c +++ b/repair/dinode.c @@ -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; } -- 2.50.1