]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Objecter::_op_submit: only replace the tid if it's 0
authorSamuel Just <sam.just@inktank.com>
Tue, 15 Apr 2014 19:55:47 +0000 (12:55 -0700)
committerSage Weil <sage@inktank.com>
Mon, 19 May 2014 20:54:18 +0000 (13:54 -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>
(cherry picked from commit 76568aa0db4e16ac1af8fe6405edade1e61cbc81)

src/osdc/Objecter.cc

index 9af742ef91b4e8eaca0c76a8fdbdf6e500312103..e1652661011584f2eff35b80e2ecb71ab3019111 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