]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
repair: always call into phase5() xfs-per-rtg-inodes
authorChristoph Hellwig <hch@lst.de>
Thu, 11 Jul 2024 12:15:12 +0000 (14:15 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Jul 2024 12:31:20 +0000 (14:31 +0200)
Make the phase5() function handle the rt file checking for the no-modify
case instead of special casing it in the main repair flow.

Signed-off-by: Christoph Hellwig <hch@lst.de>
repair/phase5.c
repair/xfs_repair.c

index 79499754ebf25f1ec9135c3b1de57228cf0261fe..65bdf942dc89dae95a6ac645ebe4022eca1f7ba9 100644 (file)
@@ -751,6 +751,14 @@ phase5(xfs_mount_t *mp)
        xfs_agnumber_t          agno;
        int                     error;
 
+       if (no_modify) {
+               printf(_("No modify flag set, skipping phase 5\n"));
+
+               if (mp->m_sb.sb_rblocks > 0)
+                       check_rtmetadata(mp);
+               return;
+       }
+
        do_log(_("Phase 5 - rebuild AG headers and trees...\n"));
        set_progress_msg(PROG_FMT_REBUILD_AG, (uint64_t)glob_agcount);
 
index 589090b57723c4629e3938f345a940222a3e32c4..7a231597b3c5097f49ca04996df36bb0e9c09ea5 100644 (file)
@@ -1461,14 +1461,7 @@ main(int argc, char **argv)
        phase4(mp);
        phase_end(mp, 4);
 
-       if (no_modify) {
-               printf(_("No modify flag set, skipping phase 5\n"));
-
-               if (mp->m_sb.sb_rblocks > 0)
-                       check_rtmetadata(mp);
-       } else {
-               phase5(mp);
-       }
+       phase5(mp);
        phase_end(mp, 5);
        rcbagbt_destroy_cur_cache();