int RGWAsyncGetBucketInstanceInfo::_send_request()
{
RGWObjectCtx obj_ctx(store);
- int r = store->get_bucket_instance_from_oid(obj_ctx, oid, *bucket_info, NULL, NULL);
+ int r = store->get_bucket_instance_from_oid(obj_ctx, oid, bucket_info, NULL, NULL);
if (r < 0) {
ldout(store->ctx(), 0) << "ERROR: failed to get bucket instance info for "
<< oid << dendl;
class RGWAsyncGetBucketInstanceInfo : public RGWAsyncRadosRequest {
RGWRados *store;
const std::string oid;
- RGWBucketInfo *bucket_info;
protected:
int _send_request() override;
public:
RGWAsyncGetBucketInstanceInfo(RGWCoroutine *caller, RGWAioCompletionNotifier *cn,
- RGWRados *_store, const std::string& oid,
- RGWBucketInfo *_bucket_info)
- : RGWAsyncRadosRequest(caller, cn), store(_store),
- oid(oid), bucket_info(_bucket_info) {}
+ RGWRados *_store, const std::string& oid)
+ : RGWAsyncRadosRequest(caller, cn), store(_store), oid(oid) {}
+
+ RGWBucketInfo bucket_info;
};
class RGWGetBucketInstanceInfoCR : public RGWSimpleCoroutine {
}
int send_request() override {
- req = new RGWAsyncGetBucketInstanceInfo(this, stack->create_completion_notifier(), store, oid, bucket_info);
+ req = new RGWAsyncGetBucketInstanceInfo(this, stack->create_completion_notifier(), store, oid);
async_rados->queue(req);
return 0;
}
int request_complete() override {
+ if (bucket_info) {
+ *bucket_info = std::move(req->bucket_info);
+ }
return req->get_ret_status();
}
};