From: Greg Farnum Date: Tue, 8 Oct 2013 00:12:33 +0000 (-0700) Subject: ReplicatedPG: copy: rename CopyOp::version -> user_version X-Git-Tag: v0.72-rc1~13^2~9 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b403ca80d95bd9971ce440ad3996b5b45ff822bf;p=ceph.git ReplicatedPG: copy: rename CopyOp::version -> user_version This version is a user version, and since we're in the OSD we should call it such. (In particular, we may want to keep track of the internal version too when doing cache promotes.) Signed-off-by: Greg Farnum --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index a9e3c557d929e..1c880347814b9 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4348,8 +4348,8 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop) { dout(10) << __func__ << " " << obc << " " << cop << dendl; ObjectOperation op; - if (cop->version) { - op.assert_version(cop->version); + if (cop->user_version) { + op.assert_version(cop->user_version); } else { // we should learn the version after the first chunk, if we didn't know // it already! @@ -4368,7 +4368,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop) new C_OnFinisher(fin, &osd->objecter_finisher), // discover the object version if we don't know it yet - cop->version ? NULL : &cop->version); + cop->user_version ? NULL : &cop->user_version); fin->tid = tid; cop->objecter_tid = tid; osd->objecter_lock.Unlock(); @@ -4514,7 +4514,7 @@ int ReplicatedPG::finish_copyfrom(OpContext *ctx) void ReplicatedPG::cancel_copy(CopyOpRef cop, bool requeue) { dout(10) << __func__ << " " << cop->obc->obs.oi.soid - << " from " << cop->src << " " << cop->oloc << " v" << cop->version + << " from " << cop->src << " " << cop->oloc << " v" << cop->user_version << dendl; // cancel objecter op, if we can diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 8aa36be5ef435..4c92abd3b224e 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -101,7 +101,7 @@ public: ObjectContextRef obc; hobject_t src; object_locator_t oloc; - version_t version; + version_t user_version; tid_t objecter_tid; @@ -119,7 +119,7 @@ public: CopyOp(CopyCallback *cb_, ObjectContextRef _obc, hobject_t s, object_locator_t l, version_t v, const hobject_t& dest) - : cb(cb_), obc(_obc), src(s), oloc(l), version(v), + : cb(cb_), obc(_obc), src(s), oloc(l), user_version(v), objecter_tid(0), size(0), rval(-1),