std::map<std::string, bufferlist> attrs;
};
+class RGWAsyncPutBucketInstanceInfo : public RGWAsyncRadosRequest {
+ rgw::sal::RadosStore* store;
+ RGWBucketInfo& bucket_info;
+ bool exclusive;
+ real_time mtime;
+ std::map<std::string, ceph::bufferlist>* attrs;
+ const DoutPrefixProvider *dpp;
+
+protected:
+ int _send_request(const DoutPrefixProvider *dpp) override;
+public:
+ RGWAsyncPutBucketInstanceInfo(RGWCoroutine* caller,
+ RGWAioCompletionNotifier* cn,
+ rgw::sal::RadosStore* store,
+ RGWBucketInfo& bucket_info,
+ bool exclusive,
+ real_time mtime,
+ std::map<std::string, ceph::bufferlist>* attrs,
+ const DoutPrefixProvider* dpp)
+ : RGWAsyncRadosRequest(caller, cn), store(store), bucket_info(bucket_info),
+ exclusive(exclusive), mtime(mtime), attrs(attrs), dpp(dpp) {}
+};
+
class RGWGetBucketInstanceInfoCR : public RGWSimpleCoroutine {
RGWAsyncRadosProcessor *async_rados;
rgw::sal::RadosStore* store;
const DoutPrefixProvider *dpp;
RGWAsyncGetBucketInstanceInfo *req{nullptr};
-
+
public:
// rgw_bucket constructor
RGWGetBucketInstanceInfoCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store,
}
};
+class RGWPutBucketInstanceInfoCR : public RGWSimpleCoroutine {
+ RGWAsyncRadosProcessor *async_rados;
+ rgw::sal::RadosStore* store;
+ RGWBucketInfo& bucket_info;
+ bool exclusive;
+ real_time mtime;
+ std::map<std::string, ceph::bufferlist>* attrs;
+ const DoutPrefixProvider *dpp;
+
+ RGWAsyncPutBucketInstanceInfo* req = nullptr;
+
+public:
+ // rgw_bucket constructor
+ RGWPutBucketInstanceInfoCR(RGWAsyncRadosProcessor *async_rados,
+ rgw::sal::RadosStore* store,
+ RGWBucketInfo& bucket_info,
+ bool exclusive,
+ real_time mtime,
+ std::map<std::string, ceph::bufferlist>* attrs,
+ const DoutPrefixProvider *dpp)
+ : RGWSimpleCoroutine(store->ctx()), async_rados(async_rados), store(store),
+ bucket_info(bucket_info), exclusive(exclusive),
+ mtime(mtime), attrs(attrs), dpp(dpp) {}
+ ~RGWPutBucketInstanceInfoCR() override {
+ request_cleanup();
+ }
+ void request_cleanup() override {
+ if (req) {
+ req->finish();
+ req = nullptr;
+ }
+ }
+
+ int send_request(const DoutPrefixProvider *dpp) override {
+ req = new RGWAsyncPutBucketInstanceInfo(this,
+ stack->create_completion_notifier(),
+ store, bucket_info, exclusive,
+ mtime, attrs, dpp);
+ async_rados->queue(req);
+ return 0;
+ }
+ int request_complete() override {
+ return req->get_ret_status();
+ }
+};
+
class RGWRadosBILogTrimCR : public RGWSimpleCoroutine {
RGWRados::BucketShard bs;
std::string start_marker;