]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: set !flushed in Reset()
authorSamuel Just <sam.just@inktank.com>
Fri, 2 Aug 2013 18:58:52 +0000 (11:58 -0700)
committerSamuel Just <sam.just@inktank.com>
Sat, 3 Aug 2013 03:59:42 +0000 (20:59 -0700)
Otherwise, we might serve a pull before we start_flush in the
ReplicaActive constructor.

Fixes: #5799
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osd/PG.cc

index f731441e8a45f3952de984970ba832c8f9fb06ea..63e760e3b212e265451dd0daad40b88b25c86195 100644 (file)
@@ -4510,7 +4510,7 @@ void PG::start_flush(ObjectStore::Transaction *t,
   FlushStateRef flush_trigger(
     new FlushState(this, get_osdmap()->get_epoch()));
   t->nop();
-  flushed = false;
+  assert(!flushed);
   on_applied->push_back(new ContainerContext<FlushStateRef>(flush_trigger));
   on_safe->push_back(new ContainerContext<FlushStateRef>(flush_trigger));
 }
@@ -5217,6 +5217,7 @@ PG::RecoveryState::Reset::Reset(my_context ctx)
   state_name = "Reset";
   context< RecoveryMachine >().log_enter(state_name);
   PG *pg = context< RecoveryMachine >().pg;
+  pg->flushed = false;
   pg->set_last_peering_reset();
 }