From: Casey Bodley Date: Wed, 17 Apr 2019 21:04:37 +0000 (-0400) Subject: rgw: add optional_yield to get_obj_data X-Git-Tag: v15.1.0~2838^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff482e17982d6c03efaf2095dacb258fa49ea540;p=ceph.git rgw: add optional_yield to get_obj_data Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index c41d3e3da60a..00ee3f192e85 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -6713,9 +6713,11 @@ struct get_obj_data { rgw::Aio* aio; uint64_t offset; // next offset to write to client rgw::AioResultList completed; // completed read results, sorted by offset + optional_yield yield; - get_obj_data(RGWRados* store, RGWGetDataCB* cb, rgw::Aio* aio, uint64_t offset) - : store(store), client_cb(cb), aio(aio), offset(offset) {} + get_obj_data(RGWRados* store, RGWGetDataCB* cb, rgw::Aio* aio, + uint64_t offset, optional_yield yield) + : store(store), client_cb(cb), aio(aio), offset(offset), yield(yield) {} int flush(rgw::AioResultList&& results) { int r = rgw::check_for_errors(results); @@ -6828,7 +6830,7 @@ int RGWRados::Object::Read::iterate(int64_t ofs, int64_t end, RGWGetDataCB *cb, const uint64_t window_size = cct->_conf->rgw_get_obj_window_size; auto aio = rgw::make_throttle(window_size, y); - get_obj_data data(store, cb, &*aio, ofs); + get_obj_data data(store, cb, &*aio, ofs, y); int r = store->iterate_obj(obj_ctx, source->get_bucket_info(), state.obj, ofs, end, chunk_size, _get_obj_iterate_cb, &data);