]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_cr_rest.cc
import quincy beta 17.1.0
[ceph.git] / ceph / src / rgw / rgw_cr_rest.cc
index f290d11929e31f45b1f59b6dc72f9f6e7ba1b07a..0bd169f99e7d36b9c6e32c72f669d5046c40ce10 100644 (file)
@@ -13,6 +13,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWCRHTTPGetDataCB::RGWCRHTTPGetDataCB(RGWCoroutinesEnv *_env, RGWCoroutine *_cr, RGWHTTPStreamRWRequest *_req) : env(_env), cr(_cr), req(_req) {
   io_id = req->get_io_id(RGWHTTPClient::HTTPCLIENT_IO_READ |RGWHTTPClient::HTTPCLIENT_IO_CONTROL);
   req->set_in_cb(this);
@@ -125,7 +127,7 @@ void RGWStreamReadHTTPResourceCRF::get_attrs(std::map<string, string> *attrs)
   req->get_out_headers(attrs);
 }
 
-int RGWStreamReadHTTPResourceCRF::decode_rest_obj(map<string, string>& headers, bufferlist& extra_data) {
+int RGWStreamReadHTTPResourceCRF::decode_rest_obj(const DoutPrefixProvider *dpp, map<string, string>& headers, bufferlist& extra_data) {
   /* basic generic implementation */
   for (auto header : headers) {
     const string& val = header.second;
@@ -136,7 +138,7 @@ int RGWStreamReadHTTPResourceCRF::decode_rest_obj(map<string, string>& headers,
   return 0;
 }
 
-int RGWStreamReadHTTPResourceCRF::read(bufferlist *out, uint64_t max_size, bool *io_pending)
+int RGWStreamReadHTTPResourceCRF::read(const DoutPrefixProvider *dpp, bufferlist *out, uint64_t max_size, bool *io_pending)
 {
     reenter(&read_state) {
     io_read_mask = req->get_io_id(RGWHTTPClient::HTTPCLIENT_IO_READ | RGWHTTPClient::HTTPCLIENT_IO_CONTROL);
@@ -154,7 +156,7 @@ int RGWStreamReadHTTPResourceCRF::read(bufferlist *out, uint64_t max_size, bool
         extra_data.claim_append(in_cb->get_extra_data());
         map<string, string> attrs;
         req->get_out_headers(&attrs);
-        int ret = decode_rest_obj(attrs, extra_data);
+        int ret = decode_rest_obj(dpp, attrs, extra_data);
         if (ret < 0) {
           ldout(cct, 0) << "ERROR: " << __func__ << " decode_rest_obj() returned ret=" << ret << dendl;
           return ret;
@@ -279,7 +281,7 @@ int RGWStreamSpliceCR::operate(const DoutPrefixProvider *dpp) {
 
       do {
         yield {
-          ret = in_crf->read(&bl, 4 * 1024 * 1024, &need_retry);
+          ret = in_crf->read(dpp, &bl, 4 * 1024 * 1024, &need_retry);
           if (ret < 0)  {
             return set_cr_error(ret);
           }