From c75a79cbac30cd14d37d89217113824d98693572 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 14 Aug 2014 13:35:12 -0700 Subject: [PATCH] rgw: fix compilation RGWRadosPutObj couldn't refer to the ceph context. Reviewed-by: Sage Weil Signed-off-by: Yehuda Sadeh (cherry picked from commit 6a555434ee3edaf742ee7e5910bcba8dd0de46dd) --- src/rgw/rgw_rados.cc | 9 +++++++-- src/rgw/rgw_rados.h | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 7be2b48dd2e65..4ac2991b65ad2 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -876,6 +876,11 @@ int RGWPutObjProcessor::complete(string& etag, time_t *mtime, time_t set_mtime, return 0; } +CephContext *RGWPutObjProcessor::ctx() +{ + return store->ctx(); +} + RGWPutObjProcessor::~RGWPutObjProcessor() { if (is_complete) @@ -3033,10 +3038,10 @@ public: */ ret = opstate->renew_state(); if (ret < 0) { - ldout(store->ctx(), 0) << "ERROR: RGWRadosPutObj::handle_data(): failed to renew op state ret=" << ret << dendl; + ldout(processor->ctx(), 0) << "ERROR: RGWRadosPutObj::handle_data(): failed to renew op state ret=" << ret << dendl; int r = processor->throttle_data(handle, false); if (r < 0) { - ldout(store->ctx(), 0) << "ERROR: RGWRadosPutObj::handle_data(): processor->throttle_data() returned " << r << dendl; + ldout(processor->ctx(), 0) << "ERROR: RGWRadosPutObj::handle_data(): processor->throttle_data() returned " << r << dendl; } /* could not renew state! might have been marked as cancelled */ return ret; diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index d811b4996c0ce..eea113769e9d1 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -551,6 +551,8 @@ public: virtual int handle_data(bufferlist& bl, off_t ofs, void **phandle, bool *again) = 0; virtual int throttle_data(void *handle, bool need_to_wait) = 0; virtual int complete(string& etag, time_t *mtime, time_t set_mtime, map& attrs); + + CephContext *ctx(); }; class RGWPutObjProcessor_Plain : public RGWPutObjProcessor -- 2.39.5