]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: copy: rename CopyOp::version -> user_version
authorGreg Farnum <greg@inktank.com>
Tue, 8 Oct 2013 00:12:33 +0000 (17:12 -0700)
committerGreg Farnum <greg@inktank.com>
Fri, 25 Oct 2013 20:36:44 +0000 (13:36 -0700)
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 <greg@inktank.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index a9e3c557d929e94e123ee821e11963a375d24fe5..1c880347814b97e8c413eb75f5ba1eadde826075 100644 (file)
@@ -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
index 8aa36be5ef435c61664d8febceaa001ba8f5341f..4c92abd3b224ea2ad3adb514387f1a02f05436b7 100644 (file)
@@ -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),