]> 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>
Thu, 8 Aug 2013 20:14:49 +0000 (13:14 -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>
(cherry picked from commit 9e7d6d547e0e8a6db6ba611882afa9bf74ea0195)

src/osd/PG.cc

index b547840a0f26339b156fd76b028abc831dc3387c..3b06d89be4b3279a0a71217f89c35b5c106f49f0 100644 (file)
@@ -5004,7 +5004,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));
   DeletingStateRef del = osd->deleting_pgs.lookup(info.pgid);
@@ -5953,6 +5953,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();
 }