]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: don't check order in finish_proxy_write
authorZhiqiang Wang <zhiqiang.wang@intel.com>
Fri, 24 Apr 2015 08:35:47 +0000 (16:35 +0800)
committerSamuel Just <sjust@redhat.com>
Tue, 18 Aug 2015 18:25:22 +0000 (11:25 -0700)
When proxy write comes back from base tier, the write op may or may not
sit at the front of the list.

Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
src/osd/ReplicatedPG.cc

index 9047d8bac0ed0d9e66235ced7284e7ddacf33044..a0cb8fa14eda705ba1f746f01a9100fe7c092817 100644 (file)
@@ -2281,9 +2281,11 @@ void ReplicatedPG::finish_proxy_write(hobject_t oid, ceph_tid_t tid, int r)
   }
   list<OpRequestRef>& in_progress_op = q->second;
   assert(in_progress_op.size());
-  OpRequestRef op = in_progress_op.front();
-  assert(op == pwop->op);
-  in_progress_op.pop_front();
+  list<OpRequestRef>::iterator it = std::find(in_progress_op.begin(),
+                                              in_progress_op.end(),
+                                             pwop->op);
+  assert(it != in_progress_op.end());
+  in_progress_op.erase(it);
   if (in_progress_op.size() == 0) {
     in_progress_proxy_ops.erase(oid);
   }