From 2207607f3c2637ad55ca4fded9348f94cf2afc3e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 23 Oct 2017 17:11:59 -0500 Subject: [PATCH] osd/PrimaryLogPG: clear DEGRADED at recovery completion even if more backfill We may have log recovery *and* backfill to do, but cease to be degraded as soon as the log recovery portion is done. If that's the case, clear the DEGRADED bit so that the PG state is not misleading. Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 731f135fbb787..916a63a98a630 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -11231,6 +11231,9 @@ bool PrimaryLogPG::start_recovery_ops( if (state_test(PG_STATE_RECOVERING)) { state_clear(PG_STATE_RECOVERING); state_clear(PG_STATE_FORCED_RECOVERY); + if (get_osdmap()->get_pg_size(info.pgid.pgid) <= acting.size()) { + state_clear(PG_STATE_DEGRADED); + } if (needs_backfill()) { dout(10) << "recovery done, queuing backfill" << dendl; queue_peering_event( -- 2.39.5