]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: make client op version actual at_version
authorSage Weil <sage@newdream.net>
Mon, 19 Jul 2010 20:40:50 +0000 (13:40 -0700)
committerSage Weil <sage@newdream.net>
Mon, 19 Jul 2010 20:42:31 +0000 (13:42 -0700)
I.e. this should take into account any cloning.  So set it after we call
prepare_transaction, not before.

src/osd/ReplicatedPG.cc

index c5108faf4008287c41ba4ec5df937fe20cd6caac..6e9af16d3801ba7828d887c1f648f76bcb417b60 100644 (file)
@@ -545,9 +545,6 @@ void ReplicatedPG::do_op(MOSDOp *op)
       ctx->at_version.version++;
       assert(ctx->at_version > info.last_update);
       assert(ctx->at_version > log.head);
-
-      // set version in op, for benefit of client and our eventual reply.  if !noop!
-      op->set_version(ctx->at_version);
     }
 
     ctx->mtime = op->get_mtime();
@@ -610,6 +607,9 @@ void ReplicatedPG::do_op(MOSDOp *op)
 
     assert(op->may_write());
 
+    // set version in op, for benefit of client and our eventual reply.  if !noop!
+    op->set_version(ctx->at_version);
+
     // trim log?
     calc_trim_to();