Skip to content

Commit d65eb8a

Browse files
author
Darrick J. Wong
committed
xfs: always rescan allegedly healthy per-ag metadata after repair
After an online repair function runs for a per-AG metadata structure, sc->sick_mask is supposed to reflect the per-AG metadata that the repair function fixed. Our next move is to re-check the metadata to assess the completeness of our repair, so we don't want the rebuilt structure to be excluded from the rescan just because the health system previously logged a problem with the data structure. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
1 parent 526aab5 commit d65eb8a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

fs/xfs/scrub/health.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,16 @@ xchk_ag_btree_healthy_enough(
226226
return true;
227227
}
228228

229+
/*
230+
* If we just repaired some AG metadata, sc->sick_mask will reflect all
231+
* the per-AG metadata types that were repaired. Exclude these from
232+
* the filesystem health query because we have not yet updated the
233+
* health status and we want everything to be scanned.
234+
*/
235+
if ((sc->flags & XREP_ALREADY_FIXED) &&
236+
type_to_health_flag[sc->sm->sm_type].group == XHG_AG)
237+
mask &= ~sc->sick_mask;
238+
229239
if (xfs_ag_has_sickness(pag, mask)) {
230240
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XFAIL;
231241
return false;

0 commit comments

Comments
 (0)