From: Samuel Just Date: Thu, 21 Mar 2013 20:37:58 +0000 (-0700) Subject: PG: halt backfill on RemoteReservationRejected in Backilling X-Git-Tag: v0.62~184^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9c8190e4f8546f53de608dd375cdfe22e0a278c;p=ceph.git PG: halt backfill on RemoteReservationRejected in Backilling Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 27376179762..c7afee9b747 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -5914,6 +5914,19 @@ PG::RecoveryState::Backfilling::Backfilling(my_context ctx) pg->state_set(PG_STATE_BACKFILL); } +boost::statechart::result +PG::RecoveryState::Backfilling::react(const RemoteReservationRejected &) +{ + PG *pg = context< RecoveryMachine >().pg; + pg->osd->local_reserver.cancel_reservation(pg->info.pgid); + pg->state_set(PG_STATE_BACKFILL_TOOFULL); + + pg->osd->recovery_wq.dequeue(pg); + + pg->schedule_backfill_full_retry(); + return transit(); +} + void PG::RecoveryState::Backfilling::exit() { context< RecoveryMachine >().log_exit(state_name, enter_time); diff --git a/src/osd/PG.h b/src/osd/PG.h index c8dd11a7ab3..5cc19229fb6 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -1492,9 +1492,11 @@ public: struct Backfilling : boost::statechart::state< Backfilling, Active >, NamedState { typedef boost::mpl::list< - boost::statechart::transition< Backfilled, Recovered > + boost::statechart::transition< Backfilled, Recovered >, + boost::statechart::custom_reaction< RemoteReservationRejected > > reactions; Backfilling(my_context ctx); + boost::statechart::result react(const RemoteReservationRejected& evt); void exit(); };