From: Sage Weil Date: Mon, 19 Jul 2010 20:40:50 +0000 (-0700) Subject: osd: make client op version actual at_version X-Git-Tag: v0.21~89 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e521b82cc99deaf9810561b5da0b4dbb68495ac;p=ceph.git osd: make client op version actual at_version I.e. this should take into account any cloning. So set it after we call prepare_transaction, not before. --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index c5108faf4008..6e9af16d3801 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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();