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>
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);
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();