]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: clear DEGRADED at recovery completion even if more backfill 18485/head
authorSage Weil <sage@redhat.com>
Mon, 23 Oct 2017 22:11:59 +0000 (17:11 -0500)
committerSage Weil <sage@redhat.com>
Tue, 24 Oct 2017 13:59:22 +0000 (08:59 -0500)
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 <sage@redhat.com>
src/osd/PrimaryLogPG.cc

index 731f135fbb787d62c1c14756e43cc38a211b0f67..916a63a98a6306dec3355b8ae458f17a2be28853 100644 (file)
@@ -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(