From: Samuel Just Date: Thu, 20 Nov 2014 23:50:50 +0000 (-0800) Subject: PG: move most of all_activated_and_commited into the AllReplicasActivated handler X-Git-Tag: v0.93~127^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e5a96fdbcd32a7d806569b5f66946b2a534e6a37;p=ceph.git PG: move most of all_activated_and_commited into the AllReplicasActivated handler It's confusing to have that logic split up so much. Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index d0783a6eed6e..c8b02b0dbfd4 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1857,12 +1857,6 @@ void PG::all_activated_and_committed() assert(!actingbackfill.empty()); assert(blocked_by.empty()); - // info.last_epoch_started is set during activate() - info.history.last_epoch_started = info.last_epoch_started; - state_clear(PG_STATE_CREATING); - - share_pg_info(); - queue_peering_event( CephPeeringEvtRef( new CephPeeringEvt( @@ -6510,9 +6504,17 @@ boost::statechart::result PG::RecoveryState::Active::react(const AllReplicasActi { PG *pg = context< RecoveryMachine >().pg; all_replicas_activated = true; + pg->state_clear(PG_STATE_ACTIVATING); + pg->state_clear(PG_STATE_CREATING); pg->state_set(PG_STATE_ACTIVE); + // info.last_epoch_started is set during activate() + pg->info.history.last_epoch_started = pg->info.last_epoch_started; + + pg->share_pg_info(); + pg->publish_stats_to_osd(); + pg->check_local(); // waiters