summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Farnum <greg@inktank.com>2013-10-10 09:37:35 -0700
committerGreg Farnum <greg@inktank.com>2013-10-17 13:11:45 -0700
commitb0e3dd179ec82b64c717a34c91063a036de0b913 (patch)
tree0781885fa917494b45360ca6843dc98475b93068
parenta8e05491efbea51ef3c52c12cd042143841cd667 (diff)
downloadceph-b0e3dd179ec82b64c717a34c91063a036de0b913.tar.gz
ReplicatedPG: promote: add the OpRequest to the Callback
This way we can do stuff to it, and we're about to. Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc2
-rw-r--r--src/osd/ReplicatedPG.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 504d8fc091d..7242f217b84 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -1209,7 +1209,7 @@ void ReplicatedPG::promote_object(OpRequestRef op, ObjectContextRef obc)
}
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);
diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h
index 0f9ba7ce035..2448f86811d 100644
--- a/src/osd/ReplicatedPG.h
+++ b/src/osd/ReplicatedPG.h
@@ -207,13 +207,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>();