]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: promote: add the OpRequest to the Callback
authorGreg Farnum <greg@inktank.com>
Thu, 10 Oct 2013 16:37:35 +0000 (09:37 -0700)
committerSage Weil <sage@inktank.com>
Sat, 14 Dec 2013 00:35:52 +0000 (16:35 -0800)
This way we can do stuff to it, and we're about to.

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h

index 545d92e200f446fe752c3e71778b4a9a5f412ede..9cc2673133a732993cc9c1681fa3105d97072567 100644 (file)
@@ -1288,7 +1288,7 @@ void ReplicatedPG::promote_object(OpRequestRef op, ObjectContextRef obc)
 dout(10) << __func__ << " " << obc->obs.oi.soid << dendl;
 
   hobject_t temp_target = generate_temp_object();
-  PromoteCallback *cb = new PromoteCallback(obc, temp_target, this);
+  PromoteCallback *cb = new PromoteCallback(op, obc, temp_target, this);
   object_locator_t oloc(m->get_object_locator());
   oloc.pool = pool.info.tier_of;
   start_copy(cb, obc, obc->obs.oi.soid, oloc, 0, temp_target);
index 71475f83a3cc8df817ba809b65706a873da32db8..5e8aa21e1a1315a7f7ddb3ea415285c4126baa2f 100644 (file)
@@ -211,13 +211,15 @@ public:
   friend class CopyFromCallback;
 
   class PromoteCallback: public CopyCallback {
+    OpRequestRef op;
     ObjectContextRef obc;
     hobject_t temp_obj;
     ReplicatedPG *pg;
   public:
-    PromoteCallback(ObjectContextRef obc_, const hobject_t& temp_obj_,
+    PromoteCallback(OpRequestRef op_, ObjectContextRef obc_,
+                    const hobject_t& temp_obj_,
                     ReplicatedPG *pg_) :
-      obc(obc_), temp_obj(temp_obj_), pg(pg_) {}
+      op(op_), obc(obc_), temp_obj(temp_obj_), pg(pg_) {}
 
     virtual void finish(CopyCallbackResults results) {
       CopyResults* results_data = results.get<1>();