From: Samuel Just Date: Tue, 12 Aug 2014 23:34:30 +0000 (-0700) Subject: Revert "ReplicatedPG: do not pass cop into C_Copyfrom" X-Git-Tag: v0.84~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ea90d9f46b2716df6e10dccaed908fd235f2000c;p=ceph.git Revert "ReplicatedPG: do not pass cop into C_Copyfrom" The ref was introduced in 589b639af7c8834a1e6293d58d77a9c440107bc3 and is actually necessary to keep the buffers around. This reverts commit 300b5e8ecbb7526b55e2cb5eeba81fd501a8b652. --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 55eb1195a459..7feb2d843d30 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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));