]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "ReplicatedPG: do not pass cop into C_Copyfrom"
authorSamuel Just <sam.just@inktank.com>
Tue, 12 Aug 2014 23:34:30 +0000 (16:34 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 12 Aug 2014 23:34:30 +0000 (16:34 -0700)
The ref was introduced in 589b639af7c8834a1e6293d58d77a9c440107bc3
and is actually necessary to keep the buffers around.

This reverts commit 300b5e8ecbb7526b55e2cb5eeba81fd501a8b652.

src/osd/ReplicatedPG.cc

index 55eb1195a459184ccf84a84442660ac0af3b1e6e..7feb2d843d30a7791548e4504e68d25628f90192 100644 (file)
@@ -5374,9 +5374,11 @@ struct C_Copyfrom : public Context {
   hobject_t oid;
   epoch_t last_peering_reset;
   ceph_tid_t tid;
-  C_Copyfrom(ReplicatedPG *p, hobject_t o, epoch_t lpr)
+  ReplicatedPG::CopyOpRef cop;
+  C_Copyfrom(ReplicatedPG *p, hobject_t o, epoch_t lpr,
+            const ReplicatedPG::CopyOpRef& c)
     : pg(p), oid(o), last_peering_reset(lpr),
-      tid(0)
+      tid(0), cop(c)
   {}
   void finish(int r) {
     if (r == -ECANCELED)
@@ -5623,7 +5625,7 @@ void ReplicatedPG::_copy_some(ObjectContextRef obc, CopyOpRef cop)
              &cop->rval);
 
   C_Copyfrom *fin = new C_Copyfrom(this, obc->obs.oi.soid,
-                                  get_last_peering_reset());
+                                  get_last_peering_reset(), cop);
   gather.set_finisher(new C_OnFinisher(fin,
                                       &osd->objecter_finisher));