]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: don't requeue waiting_for_active unless flushed and active
authorSamuel Just <sam.just@inktank.com>
Wed, 30 Oct 2013 18:32:13 +0000 (11:32 -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

index ef529c189f8496d30488cc121c1c42354b59f3c0..fc215df97a3d6999c860f3613c4d3180ddab79f2 100644 (file)
@@ -1307,7 +1307,7 @@ void PG::activate(ObjectStore::Transaction& t,
   }
 
   // waiters
-  if (!is_replay()) {
+  if (!is_replay() && flushes_in_progress == 0) {
     requeue_ops(waiting_for_active);
   }
 
@@ -5861,15 +5861,15 @@ PG::RecoveryState::Active::Active(my_context ctx)
   assert(!pg->backfill_reserved);
   assert(pg->is_primary());
   dout(10) << "In Active, about to call activate" << dendl;
+  pg->start_flush(
+    context< RecoveryMachine >().get_cur_transaction(),
+    context< RecoveryMachine >().get_on_applied_context_list(),
+    context< RecoveryMachine >().get_on_safe_context_list());
   pg->activate(*context< RecoveryMachine >().get_cur_transaction(),
               pg->get_osdmap()->get_epoch(),
               *context< RecoveryMachine >().get_on_safe_context_list(),
               *context< RecoveryMachine >().get_query_map(),
               context< RecoveryMachine >().get_info_map());
-  pg->start_flush(
-    context< RecoveryMachine >().get_cur_transaction(),
-    context< RecoveryMachine >().get_on_applied_context_list(),
-    context< RecoveryMachine >().get_on_safe_context_list());
   assert(pg->is_active());
   dout(10) << "Activate Finished" << dendl;
 }