struct AioResult {
rgw_raw_obj obj;
+ bufferlist data; // result buffer for reads
int result = 0;
};
struct AioResultEntry : AioResult, boost::intrusive::list_base_hook<> {
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,
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<Pending>();
p->obj = raw_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);
}
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,