]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG,PG: move duplicate FlushedEvt logic info on_flushed()
authorDavid Zafman <david.zafman@inktank.com>
Sat, 2 Nov 2013 01:15:49 +0000 (18:15 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 19 Nov 2013 18:06:24 +0000 (10:06 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc
src/osd/ReplicatedPG.cc

index 8207a675bce4a76f3a1863a1dff3fde697f0cd72..81b9e2e6a755cb5ebe8eb5b492615e4e8544d22b 100644 (file)
@@ -5106,9 +5106,7 @@ boost::statechart::result
 PG::RecoveryState::Started::react(const FlushedEvt&)
 {
   PG *pg = context< RecoveryMachine >().pg;
-  pg->flushed = true;
   pg->on_flushed();
-  pg->requeue_ops(pg->waiting_for_active);
   return discard_event();
 }
 
@@ -5159,9 +5157,7 @@ boost::statechart::result
 PG::RecoveryState::Reset::react(const FlushedEvt&)
 {
   PG *pg = context< RecoveryMachine >().pg;
-  pg->flushed = true;
   pg->on_flushed();
-  pg->requeue_ops(pg->waiting_for_active);
   return discard_event();
 }
 
@@ -6838,8 +6834,6 @@ boost::statechart::result
 PG::RecoveryState::WaitFlushedPeering::react(const FlushedEvt &evt)
 {
   PG *pg = context< RecoveryMachine >().pg;
-  pg->flushed = true;
-  pg->requeue_ops(pg->waiting_for_active);
   pg->on_flushed();
   return transit< WaitFlushedPeering >();
 }
index 57d9ec72bbd423f89baea2204dfd86f5ae46cc06..e957a415f0c734f9deb6d8c1a3b338b6c278abce 100644 (file)
@@ -7302,6 +7302,8 @@ void ReplicatedPG::on_flushed()
   }
   assert(object_contexts.empty());
   pgbackend->on_flushed();
+  flushed = true;
+  requeue_ops(pg->waiting_for_active);
 }
 
 void ReplicatedPG::on_removal(ObjectStore::Transaction *t)