]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::on_change: requeue in_progress_async_reads close to last 3736/head 3737/head
authorSamuel Just <sjust@redhat.com>
Wed, 11 Feb 2015 18:30:51 +0000 (10:30 -0800)
committerSamuel Just <sjust@redhat.com>
Wed, 11 Feb 2015 18:30:51 +0000 (10:30 -0800)
Fixes: 10768
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index 93f4f72b88d18afd9f73d766a0a7b462dcd3ead3..488ebd8eac0fec9a216f373582c761ad17b08626 100644 (file)
@@ -10402,14 +10402,6 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t)
 
   context_registry_on_change();
 
-  for (list<pair<OpRequestRef, OpContext*> >::iterator i =
-         in_progress_async_reads.begin();
-       i != in_progress_async_reads.end();
-       in_progress_async_reads.erase(i++)) {
-    close_op_ctx(i->second, -ECANCELED);
-    requeue_op(i->first);
-  }
-
   cancel_copy_ops(is_primary());
   cancel_flush_ops(is_primary());
   cancel_proxy_read_ops(is_primary());
@@ -10446,6 +10438,16 @@ void ReplicatedPG::on_change(ObjectStore::Transaction *t)
     waiting_for_all_missing.clear();
   }
 
+
+  for (list<pair<OpRequestRef, OpContext*> >::iterator i =
+         in_progress_async_reads.begin();
+       i != in_progress_async_reads.end();
+       in_progress_async_reads.erase(i++)) {
+    close_op_ctx(i->second, -ECANCELED);
+    if (is_primary())
+      requeue_op(i->first);
+  }
+
   // this will requeue ops we were working on but didn't finish, and
   // any dups
   apply_and_flush_repops(is_primary());