diff --git a/src/rgw/rgw_aio.h b/src/rgw/rgw_aio.h index 25f828a9dc4..fe83b1f23ad 100644 --- a/src/rgw/rgw_aio.h +++ b/src/rgw/rgw_aio.h @@ -27,6 +27,7 @@ namespace rgw { struct AioResult { rgw_raw_obj obj; + bufferlist data; // result buffer for reads int result = 0; }; struct AioResultEntry : AioResult, boost::intrusive::list_base_hook<> { @@ -63,7 +64,7 @@ class Aio { virtual AioResultList submit(RGWSI_RADOS::Obj& obj, const rgw_raw_obj& raw_obj, librados::ObjectReadOperation *op, - bufferlist *data, uint64_t cost) = 0; + uint64_t cost) = 0; virtual AioResultList submit(RGWSI_RADOS::Obj& obj, const rgw_raw_obj& raw_obj, diff --git a/src/rgw/rgw_aio_throttle.cc b/src/rgw/rgw_aio_throttle.cc index bf8a8a82722..1ec0aa5d513 100644 --- a/src/rgw/rgw_aio_throttle.cc +++ b/src/rgw/rgw_aio_throttle.cc @@ -62,7 +62,7 @@ AioResultList AioThrottle::submit(RGWSI_RADOS::Obj& obj, AioResultList AioThrottle::submit(RGWSI_RADOS::Obj& obj, const rgw_raw_obj& raw_obj, librados::ObjectReadOperation *op, - bufferlist *data, uint64_t cost) + uint64_t cost) { auto p = std::make_unique(); p->obj = raw_obj; @@ -73,7 +73,7 @@ AioResultList AioThrottle::submit(RGWSI_RADOS::Obj& obj, completed.push_back(*p); } else { get(*p); - p->result = obj.aio_operate(p->completion, op, data); + p->result = obj.aio_operate(p->completion, op, &p->data); if (p->result < 0) { put(*p); } diff --git a/src/rgw/rgw_aio_throttle.h b/src/rgw/rgw_aio_throttle.h index 1f9c53d4b9b..b07eae3ae48 100644 --- a/src/rgw/rgw_aio_throttle.h +++ b/src/rgw/rgw_aio_throttle.h @@ -69,7 +69,7 @@ class AioThrottle : public Aio { AioResultList submit(RGWSI_RADOS::Obj& obj, const rgw_raw_obj& raw_obj, librados::ObjectReadOperation *op, - bufferlist *data, uint64_t cost) override; + uint64_t cost) override; AioResultList submit(RGWSI_RADOS::Obj& obj, const rgw_raw_obj& raw_obj, librados::ObjectWriteOperation *op,