]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Objecter::_op_submit: only replace the tid if it's 0 1799/head
authorSamuel Just <sam.just@inktank.com>
Tue, 15 Apr 2014 19:55:47 +0000 (12:55 -0700)
committerSage Weil <sage@inktank.com>
Sat, 10 May 2014 22:15:57 +0000 (15:15 -0700)
Otherwise, redirected ops will suddenly have a different tid
and will become uncancelable.

Fixes: #7588
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osdc/Objecter.cc

index 51b95f288b7790ae63530b69a12bad736890ffa1..1166651de239f1516ed9ceba5790c6bdeaefb06a 100644 (file)
@@ -1243,9 +1243,11 @@ ceph_tid_t Objecter::op_submit(Op *op)
 
 ceph_tid_t Objecter::_op_submit(Op *op)
 {
-  // pick tid
-  ceph_tid_t mytid = ++last_tid;
-  op->tid = mytid;
+  // pick tid if we haven't got one yet
+  if (op->tid == ceph_tid_t(0)) {
+    ceph_tid_t mytid = ++last_tid;
+    op->tid = mytid;
+  }
   assert(client_inc >= 0);
 
   // pick target