#include "rgw_log.h"
#include "rgw_acl.h"
#include "rgw_access.h"
- #include "rgw_bucket.h"
+#define DOUT_SUBSYS rgw
+
static rgw_bucket log_bucket(RGW_LOG_POOL_NAME);
static void set_param_str(struct req_state *s, const char *name, string& str)
FCGX_Finish_r(fcgx);
delete fcgx;
- RGW_LOG(0) << "====== req done fcgx=" << hex << fcgx << dec << " http_status=" << http_ret << " ======" << dendl;
+ dout(0) << "====== req done fcgx=" << hex << fcgx << dec << " http_status=" << http_ret << " ======" << dendl;
}
- class C_RGWMaintenanceTick : public Context {
- SafeTimer *timer;
- public:
- C_RGWMaintenanceTick(SafeTimer *t) : timer(t) {}
- void finish(int r) {
- rgw_bucket_maintain_pools();
- dout(20) << "C_RGWMaintenanceTick::finish()" << dendl;
- timer->add_event_after(g_conf->rgw_maintenance_tick_interval, new C_RGWMaintenanceTick(timer));
- }
- };
/*
* start up the RADOS connection and then handle HTTP messages as they come in
*/
if (s->bucket_name_str.size()) {
RGWBucketInfo bucket_info;
- ret = rgw_get_bucket_info(s->bucket_name_str, bucket_info);
+ ret = rgwstore->get_bucket_info(s->bucket_name_str, bucket_info);
if (ret < 0) {
- RGW_LOG(0) << "couldn't get bucket from bucket_name (name=" << s->bucket_name_str << ")" << dendl;
+ dout(0) << "couldn't get bucket from bucket_name (name=" << s->bucket_name_str << ")" << dendl;
return ret;
}
s->bucket = bucket_info.bucket;
attrs[RGW_ATTR_ACL] = aclbl;
- ret = rgw_bucket_allocate_pool(s->bucket_name_str, s->bucket);
- if (ret < 0)
- goto done;
-
- ret = rgw_create_bucket(s->user.user_id, s->bucket_name_str, s->bucket, attrs, true,
- s->user.auid);
+ s->bucket.name = s->bucket_name_str;
+ ret = rgwstore->create_bucket(s->user.user_id, s->bucket, attrs, false,
+ true, s->user.auid);
/* continue if EEXIST and create_bucket will fail below. this way we can recover
* from a partial create by retrying it. */
- RGW_LOG(0) << "rgw_create_bucket returned ret=" << ret << " bucket=" << s->bucket << dendl;
+ dout(0) << "rgw_create_bucket returned ret=" << ret << " bucket=" << s->bucket << dendl;
if (ret && ret != -EEXIST)
goto done;
#include "rgw_common.h"
#include "rgw_access.h"
#include "rgw_tools.h"
- #include "rgw_bucket.h"
+#define DOUT_SUBSYS rgw
+
#define READ_CHUNK_LEN (16 * 1024)
int rgw_put_obj(string& uid, rgw_bucket& bucket, string& oid, const char *data, size_t size)