]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "PG: add custom_reaction Backfilled and release reservations after backfill" 24902/head
authorNeha Ojha <nojha@redhat.com>
Fri, 2 Nov 2018 23:37:17 +0000 (19:37 -0400)
committerNeha Ojha <nojha@redhat.com>
Fri, 2 Nov 2018 23:38:32 +0000 (19:38 -0400)
This reverts commit f512f905b140bfa9cc3241793e441de2c377e60b.

Signed-off-by: Neha Ojha <nojha@redhat.com>
src/osd/PG.cc
src/osd/PG.h

index 6581cc2988b9eca7872d20be9bbbcb340711649e..95a9b7f64d2ccb73ad2f06e72cc2f314f7504d00 100644 (file)
@@ -6839,29 +6839,6 @@ PG::RecoveryState::Backfilling::Backfilling(my_context ctx)
   pg->publish_stats_to_osd();
 }
 
-boost::statechart::result
-PG::RecoveryState::Backfilling::react(const Backfilled &c)
-{
-  PG *pg = context< RecoveryMachine >().pg;
-  pg->osd->local_reserver.cancel_reservation(pg->info.pgid);
-  for (set<pg_shard_t>::iterator it = pg->backfill_targets.begin();
-       it != pg->backfill_targets.end();
-       ++it) {
-    assert(*it != pg->pg_whoami);
-    ConnectionRef con = pg->osd->get_con_osd_cluster(
-      it->osd, pg->get_osdmap()->get_epoch());
-    if (con) {
-      pg->osd->send_message_osd_cluster(
-        new MBackfillReserve(
-         MBackfillReserve::REJECT,
-         spg_t(pg->info.pgid.pgid, it->shard),
-         pg->get_osdmap()->get_epoch()),
-       con.get());
-    }
-  }
-  return transit<Recovered>();
-}
-
 boost::statechart::result
 PG::RecoveryState::Backfilling::react(const DeferBackfill &c)
 {
@@ -6887,10 +6864,13 @@ PG::RecoveryState::Backfilling::react(const DeferBackfill &c)
        con.get());
     }
   }
+
+
   if (!pg->waiting_on_backfill.empty()) {
     pg->waiting_on_backfill.clear();
     pg->finish_recovery_op(hobject_t::get_max());
   }
+
   pg->schedule_backfill_retry(c.delay);
   return transit<NotBackfilling>();
 }
index 12bf9e977836ab6d37be4c33aa293d4210cf57f3..212da4d7ed386bebfccaf7b19ac7d68870ec33cc 100644 (file)
@@ -2109,14 +2109,13 @@ protected:
 
     struct Backfilling : boost::statechart::state< Backfilling, Active >, NamedState {
       typedef boost::mpl::list<
-        boost::statechart::custom_reaction< Backfilled >,
+       boost::statechart::transition< Backfilled, Recovered >,
        boost::statechart::custom_reaction< DeferBackfill >,
        boost::statechart::custom_reaction< UnfoundBackfill >,
        boost::statechart::custom_reaction< RemoteReservationRejected >
        > reactions;
       explicit Backfilling(my_context ctx);
       boost::statechart::result react(const RemoteReservationRejected& evt);
-      boost::statechart::result react(const Backfilled& evt);
       boost::statechart::result react(const DeferBackfill& evt);
       boost::statechart::result react(const UnfoundBackfill& evt);
       void exit();