]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: on recovery done, requeue for backfill
authorSage Weil <sage@redhat.com>
Mon, 23 Oct 2017 03:46:00 +0000 (22:46 -0500)
committerSage Weil <sage@redhat.com>
Mon, 23 Oct 2017 03:46:00 +0000 (22:46 -0500)
We were keeping our existing recovery reservation slot (with a high
priority) and going straight to waiting for backfill reservations on
the peers.  This is a problem because the reserver thinks we're doing
high priority work when we're actually doing lower-priority backfill.

Fix by closing out our recovery reservation and going to the
WaitLocalBackfillReserved state, where we'll re-request backfill at the
appropriate priority.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc

index 838c5b34c3db495769272d1433326df3830ed488..3161209e48a98ec1f026db09527ec8e06598b5f5 100644 (file)
@@ -7015,7 +7015,8 @@ PG::RecoveryState::Recovering::react(const RequestBackfill &evt)
   pg->state_clear(PG_STATE_RECOVERING);
   pg->state_clear(PG_STATE_FORCED_RECOVERY);
   release_reservations();
-  return transit<WaitRemoteBackfillReserved>();
+  pg->osd->local_reserver.cancel_reservation(pg->info.pgid);
+  return transit<WaitLocalBackfillReserved>();
 }
 
 boost::statechart::result