bool get_content_type, std::string& ns, bool *is_truncated, RGWAccessListFilter *filter) = 0;
/** Create a new bucket*/
- virtual int create_bucket(std::string& id, rgw_bucket& bucket, map<std::string, bufferlist>& attrs, bool create_pool, bool assign_marker, bool exclusive = true, uint64_t auid = 0) = 0;
+ virtual int create_bucket(std::string& id, rgw_bucket& bucket,
+ map<std::string, bufferlist>& attrs,
+ bool system_bucket, bool exclusive = true,
+ uint64_t auid = 0) = 0;
virtual int select_bucket_placement(string& bucket_name, rgw_bucket& bucket) { return 0; }
virtual int create_pools(std::string& id, vector<string>& names, vector<int>& retcodes, int auid = 0) { return -ENOTSUP; }
/** write an object to the storage device in the appropriate pool
rgw_bucket& bucket = bucket_info.bucket;
- ret = rgwstore->create_bucket(user_id, bucket, attrs, false, true, auid);
+ ret = rgwstore->create_bucket(user_id, bucket, attrs, false, auid);
if (ret && ret != -EEXIST)
goto done;
if (bucket_name[0] == '.') {
bucket.name = bucket_name;
bucket.pool = bucket_name;
- return rgwstore->create_bucket(id, bucket, attrs, true, false, exclusive, auid);
+ return rgwstore->create_bucket(id, bucket, attrs, true, exclusive, auid);
}
int ret = rgwstore->select_bucket_placement(bucket_name, bucket);
if (ret < 0)
return ret;
- ret = rgwstore->create_bucket(id, bucket, attrs, false, true, exclusive, auid);
+ ret = rgwstore->create_bucket(id, bucket, attrs, false, exclusive, auid);
if (ret < 0)
return ret;
}
-int RGWFS::create_bucket(std::string& id, rgw_bucket& bucket, map<std::string, bufferlist>& attrs, bool create_pool, bool assign_marker, bool exclusive, uint64_t auid)
+int RGWFS::create_bucket(std::string& id, rgw_bucket& bucket, map<std::string, bufferlist>& attrs, bool system_bucket, bool exclusive, uint64_t auid)
{
int len = strlen(DIR_NAME) + 1 + bucket.name.size() + 1;
char buf[len];
std::string& marker, std::vector<RGWObjEnt>& result, map<string, bool>& common_prefixes,
bool get_content_type, string& ns, bool *is_truncated, RGWAccessListFilter *filter);
- int create_bucket(std::string& id, rgw_bucket& bucket, map<std::string, bufferlist>& attrs, bool create_pool, bool assign_marker, bool exclusive, uint64_t auid=0);
+ int create_bucket(std::string& id, rgw_bucket& bucket, map<std::string, bufferlist>& attrs, bool system_bucket, bool exclusive, uint64_t auid=0);
int put_obj_meta(void *ctx, std::string& id, rgw_obj& obj, uint64_t size, time_t *mtime,
map<std::string, bufferlist>& attrs, RGWObjCategory category, bool exclusive);
int put_obj_data(void *ctx, std::string& id, rgw_obj& obj, const char *data,
*/
int RGWRados::create_bucket(std::string& id, rgw_bucket& bucket,
map<std::string, bufferlist>& attrs,
- bool create_pool, bool assign_marker,
+ bool system_bucket,
bool exclusive, uint64_t auid)
{
librados::ObjectWriteOperation op;
if (ret < 0 && ret != -EEXIST)
return ret;
- if (create_pool) {
+ if (system_bucket) {
ret = rados->pool_create(bucket.pool.c_str(), auid);
if (ret == -EEXIST)
ret = 0;
if (ret < 0)
root_pool_ctx.remove(bucket.name.c_str());
- }
-
- if (assign_marker) {
+ } else {
librados::IoCtx io_ctx; // context for new bucket
int r = open_bucket_ctx(bucket, io_ctx);
* create a bucket with name bucket and the given list of attrs
* returns 0 on success, -ERR# otherwise.
*/
- virtual int create_bucket(std::string& id, rgw_bucket& bucket, map<std::string,bufferlist>& attrs, bool create_pool, bool assign_marker, bool exclusive = true, uint64_t auid = 0);
+ virtual int create_bucket(std::string& id, rgw_bucket& bucket,
+ map<std::string,bufferlist>& attrs,
+ bool system_bucket, bool exclusive = true,
+ uint64_t auid = 0);
virtual int select_bucket_placement(std::string& bucket_name, rgw_bucket& bucket);
virtual int create_pools(std::string& id, vector<string>& names, vector<int>& retcodes, int auid = 0);