diff options
author | Samuel Just <sam.just@inktank.com> | 2013-03-21 13:37:58 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-03-21 18:51:40 -0700 |
commit | f9c8190e4f8546f53de608dd375cdfe22e0a278c (patch) | |
tree | c44dc638d26d67e05ce269da372c1256be26f11d | |
parent | 022903bf73c85343e01336e104ac444806e33af8 (diff) | |
download | ceph-f9c8190e4f8546f53de608dd375cdfe22e0a278c.tar.gz |
PG: halt backfill on RemoteReservationRejected in Backilling
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/PG.cc | 13 | ||||
-rw-r--r-- | src/osd/PG.h | 4 |
2 files changed, 16 insertions, 1 deletions
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<NotBackfilling>(); +} + 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(); }; |