summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-02-11 13:54:50 -0800
committerYehuda Sadeh <yehuda@inktank.com>2013-02-25 14:59:37 -0800
commit6c7611993e1006687b6f8e2f9a866701250fc90b (patch)
tree226f1cb0abb759c310aba76e3d454a0e3b807fe0
parente79201ba55058625935342f2c8ad90b02cf4f2cb (diff)
downloadceph-6c7611993e1006687b6f8e2f9a866701250fc90b.tar.gz
rgw: s/RadosParams/ZoneParams/g
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_admin.cc14
-rw-r--r--src/rgw/rgw_cache.h2
-rw-r--r--src/rgw/rgw_log.cc6
-rw-r--r--src/rgw/rgw_op.cc2
-rw-r--r--src/rgw/rgw_rados.cc68
-rw-r--r--src/rgw/rgw_rados.h6
-rw-r--r--src/rgw/rgw_user.cc40
7 files changed, 69 insertions, 69 deletions
diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc
index 96f1b334ea1..2c2ea3d0c60 100644
--- a/src/rgw/rgw_admin.cc
+++ b/src/rgw/rgw_admin.cc
@@ -644,7 +644,7 @@ static int remove_bucket(RGWRados *store, rgw_bucket& bucket, bool delete_childr
obj.bucket = bucket;
int max = 1000;
- ret = rgw_get_obj(store, NULL, store->params.domain_root, bucket.name, bl, NULL);
+ ret = rgw_get_obj(store, NULL, store->zone.domain_root, bucket.name, bl, NULL);
bufferlist::iterator iter = bl.begin();
try {
@@ -1869,25 +1869,25 @@ next:
}
if (opt_cmd == OPT_ZONE_INFO) {
- store->params.dump(formatter);
+ store->zone.dump(formatter);
formatter->flush(cout);
}
if (opt_cmd == OPT_ZONE_SET) {
- RGWRadosParams params;
- params.init_default();
- int ret = read_decode_json(infile, params);
+ RGWZoneParams zone;
+ zone.init_default();
+ int ret = read_decode_json(infile, zone);
if (ret < 0) {
return 1;
}
- ret = params.store_info(g_ceph_context, store);
+ ret = zone.store_info(g_ceph_context, store);
if (ret < 0) {
cerr << "ERROR: couldn't store zone info: " << cpp_strerror(-ret) << std::endl;
return 1;
}
- params.dump(formatter);
+ zone.dump(formatter);
formatter->flush(cout);
}
diff --git a/src/rgw/rgw_cache.h b/src/rgw/rgw_cache.h
index e4002f6af25..4de16384f1a 100644
--- a/src/rgw/rgw_cache.h
+++ b/src/rgw/rgw_cache.h
@@ -211,7 +211,7 @@ void RGWCache<T>::normalize_bucket_and_obj(rgw_bucket& src_bucket, string& src_o
dst_bucket = src_bucket;
dst_obj = src_obj;
} else {
- dst_bucket = T::params.domain_root;
+ dst_bucket = T::zone.domain_root;
dst_obj = src_bucket.name;
}
}
diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc
index b79cf30bbe3..09fdacf4f2f 100644
--- a/src/rgw/rgw_log.cc
+++ b/src/rgw/rgw_log.cc
@@ -340,11 +340,11 @@ int rgw_log_op(RGWRados *store, struct req_state *s, const string& op_name, OpsL
string oid = render_log_object_name(s->cct->_conf->rgw_log_object_name, &bdt,
s->bucket.bucket_id, entry.bucket);
- rgw_obj obj(store->params.log_pool, oid);
+ rgw_obj obj(store->zone.log_pool, oid);
ret = store->append_async(obj, bl.length(), bl);
if (ret == -ENOENT) {
- ret = store->create_pool(store->params.log_pool);
+ ret = store->create_pool(store->zone.log_pool);
if (ret < 0)
goto done;
// retry
@@ -364,7 +364,7 @@ done:
int rgw_log_intent(RGWRados *store, rgw_obj& obj, RGWIntentEvent intent, const utime_t& timestamp, bool utc)
{
- rgw_bucket intent_log_bucket(store->params.intent_log_pool);
+ rgw_bucket intent_log_bucket(store->zone.intent_log_pool);
rgw_intent_log_entry entry;
entry.obj = obj;
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc
index 0a022d01975..2cb489291e2 100644
--- a/src/rgw/rgw_op.cc
+++ b/src/rgw/rgw_op.cc
@@ -805,7 +805,7 @@ void RGWCreateBucket::execute()
bufferlist aclbl;
bool existed;
int r;
- rgw_obj obj(store->params.domain_root, s->bucket_name_str);
+ rgw_obj obj(store->zone.domain_root, s->bucket_name_str);
ret = get_params();
if (ret < 0)
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index b850ba953bf..d9753f8f596 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -61,7 +61,7 @@ static RGWObjCategory main_category = RGW_OBJ_CATEGORY_MAIN;
#define dout_subsys ceph_subsys_rgw
-void RGWRadosParams::init_default()
+void RGWZoneParams::init_default()
{
domain_root = ".rgw";
control_pool = ".rgw.control";
@@ -75,7 +75,7 @@ void RGWRadosParams::init_default()
user_uid_pool = ".users.uid";
}
-void RGWRadosParams::dump(Formatter *f) const
+void RGWZoneParams::dump(Formatter *f) const
{
f->open_object_section("zone");
f->dump_string("domain_root", domain_root.pool);
@@ -91,7 +91,7 @@ void RGWRadosParams::dump(Formatter *f) const
f->close_section();
}
-void RGWRadosParams::decode_json(JSONObj *obj)
+void RGWZoneParams::decode_json(JSONObj *obj)
{
JSONDecoder::decode_json("domain_root", domain_root.pool, obj);
JSONDecoder::decode_json("control_pool", control_pool.pool, obj);
@@ -105,7 +105,7 @@ void RGWRadosParams::decode_json(JSONObj *obj)
JSONDecoder::decode_json("user_uid_pool ", user_uid_pool.pool, obj);
}
-int RGWRadosParams::init(CephContext *cct, RGWRados *store)
+int RGWZoneParams::init(CephContext *cct, RGWRados *store)
{
string pool_name = cct->_conf->rgw_zone_root_pool;
if (pool_name.empty())
@@ -133,7 +133,7 @@ int RGWRadosParams::init(CephContext *cct, RGWRados *store)
return 0;
}
-int RGWRadosParams::store_info(CephContext *cct, RGWRados *store)
+int RGWZoneParams::store_info(CephContext *cct, RGWRados *store)
{
string pool_name = cct->_conf->rgw_zone_root_pool;
if (pool_name.empty())
@@ -173,7 +173,7 @@ RGWObjState *RGWRadosCtx::get_state(rgw_obj& obj) {
if (obj.object.size()) {
return &objs_state[obj];
} else {
- rgw_obj new_obj(store->params.domain_root, obj.bucket.name);
+ rgw_obj new_obj(store->zone.domain_root, obj.bucket.name);
return &objs_state[new_obj];
}
}
@@ -182,7 +182,7 @@ void RGWRadosCtx::set_atomic(rgw_obj& obj) {
if (obj.object.size()) {
objs_state[obj].is_atomic = true;
} else {
- rgw_obj new_obj(store->params.domain_root, obj.bucket.name);
+ rgw_obj new_obj(store->zone.domain_root, obj.bucket.name);
objs_state[new_obj].is_atomic = true;
}
}
@@ -191,7 +191,7 @@ void RGWRadosCtx::set_prefetch_data(rgw_obj& obj) {
if (obj.object.size()) {
objs_state[obj].prefetch_data = true;
} else {
- rgw_obj new_obj(store->params.domain_root, obj.bucket.name);
+ rgw_obj new_obj(store->zone.domain_root, obj.bucket.name);
objs_state[new_obj].prefetch_data = true;
}
}
@@ -225,7 +225,7 @@ int RGWRados::initialize()
if (ret < 0)
return ret;
- params.init(cct, this);
+ zone.init(cct, this);
ret = open_root_pool_ctx();
if (ret < 0)
@@ -270,7 +270,7 @@ void RGWRados::finalize_watch()
*/
int RGWRados::open_root_pool_ctx()
{
- const string& pool = params.domain_root.name;
+ const string& pool = zone.domain_root.name;
const char *pool_str = pool.c_str();
int r = rados->ioctx_create(pool_str, root_pool_ctx);
if (r == -ENOENT) {
@@ -288,7 +288,7 @@ int RGWRados::open_root_pool_ctx()
int RGWRados::open_gc_pool_ctx()
{
- const char *gc_pool = params.gc_pool.name.c_str();
+ const char *gc_pool = zone.gc_pool.name.c_str();
int r = rados->ioctx_create(gc_pool, gc_pool_ctx);
if (r == -ENOENT) {
r = rados->pool_create(gc_pool);
@@ -305,7 +305,7 @@ int RGWRados::open_gc_pool_ctx()
int RGWRados::init_watch()
{
- const char *control_pool = params.control_pool.name.c_str();
+ const char *control_pool = zone.control_pool.name.c_str();
int r = rados->ioctx_create(control_pool, control_pool_ctx);
if (r == -ENOENT) {
r = rados->pool_create(control_pool);
@@ -437,7 +437,7 @@ struct log_list_state {
int RGWRados::log_list_init(const string& prefix, RGWAccessHandle *handle)
{
log_list_state *state = new log_list_state;
- const char *log_pool = params.log_pool.name.c_str();
+ const char *log_pool = zone.log_pool.name.c_str();
int r = rados->ioctx_create(log_pool, state->io_ctx);
if (r < 0) {
delete state;
@@ -472,7 +472,7 @@ int RGWRados::log_list_next(RGWAccessHandle handle, string *name)
int RGWRados::log_remove(const string& name)
{
librados::IoCtx io_ctx;
- const char *log_pool = params.log_pool.name.c_str();
+ const char *log_pool = zone.log_pool.name.c_str();
int r = rados->ioctx_create(log_pool, io_ctx);
if (r < 0)
return r;
@@ -492,7 +492,7 @@ struct log_show_state {
int RGWRados::log_show_init(const string& name, RGWAccessHandle *handle)
{
log_show_state *state = new log_show_state;
- const char *log_pool = params.log_pool.name.c_str();
+ const char *log_pool = zone.log_pool.name.c_str();
int r = rados->ioctx_create(log_pool, state->io_ctx);
if (r < 0) {
delete state;
@@ -810,7 +810,7 @@ int RGWRados::create_bucket(string& owner, rgw_bucket& bucket,
uint32_t nop = 0;
::encode(nop, bl);
- const string& pool = params.domain_root.name;
+ const string& pool = zone.domain_root.name;
const char *pool_str = pool.c_str();
librados::IoCtx id_io_ctx;
r = rados->ioctx_create(pool_str, id_io_ctx);
@@ -849,7 +849,7 @@ int RGWRados::store_bucket_info(RGWBucketInfo& info, map<string, bufferlist> *pa
bufferlist bl;
::encode(info, bl);
- int ret = rgw_put_system_obj(this, params.domain_root, info.bucket.name, bl.c_str(), bl.length(), exclusive, pattrs);
+ int ret = rgw_put_system_obj(this, zone.domain_root, info.bucket.name, bl.c_str(), bl.length(), exclusive, pattrs);
if (ret < 0)
return ret;
@@ -865,9 +865,9 @@ int RGWRados::select_bucket_placement(string& bucket_name, rgw_bucket& bucket)
string pool_name;
bool write_map = false;
- rgw_obj obj(params.domain_root, avail_pools);
+ rgw_obj obj(zone.domain_root, avail_pools);
- int ret = rgw_get_obj(this, NULL, params.domain_root, avail_pools, map_bl);
+ int ret = rgw_get_obj(this, NULL, zone.domain_root, avail_pools, map_bl);
if (ret < 0) {
goto read_omap;
}
@@ -939,7 +939,7 @@ int RGWRados::update_placement_map()
{
bufferlist header;
map<string, bufferlist> m;
- rgw_obj obj(params.domain_root, avail_pools);
+ rgw_obj obj(zone.domain_root, avail_pools);
int ret = omap_get_all(obj, header, m);
if (ret < 0)
return ret;
@@ -960,7 +960,7 @@ int RGWRados::add_bucket_placement(std::string& new_pool)
if (ret < 0) // DNE, or something
return ret;
- rgw_obj obj(params.domain_root, avail_pools);
+ rgw_obj obj(zone.domain_root, avail_pools);
bufferlist empty_bl;
ret = omap_set(obj, new_pool, empty_bl);
@@ -972,7 +972,7 @@ int RGWRados::add_bucket_placement(std::string& new_pool)
int RGWRados::remove_bucket_placement(std::string& old_pool)
{
- rgw_obj obj(params.domain_root, avail_pools);
+ rgw_obj obj(zone.domain_root, avail_pools);
int ret = omap_del(obj, old_pool);
// don't care about return value
@@ -987,7 +987,7 @@ int RGWRados::list_placement_set(set<string>& names)
map<string, bufferlist> m;
string pool_name;
- rgw_obj obj(params.domain_root, avail_pools);
+ rgw_obj obj(zone.domain_root, avail_pools);
int ret = omap_get_all(obj, header, m);
if (ret < 0)
return ret;
@@ -1528,7 +1528,7 @@ int RGWRados::delete_bucket(rgw_bucket& bucket)
}
} while (is_truncated);
- rgw_obj obj(params.domain_root, bucket.name);
+ rgw_obj obj(zone.domain_root, bucket.name);
r = delete_obj(NULL, obj);
if (r < 0)
return r;
@@ -1922,7 +1922,7 @@ int RGWRados::get_attr(void *ctx, rgw_obj& obj, const char *name, bufferlist& de
if (actual_obj.size() == 0) {
actual_obj = bucket.name;
- actual_bucket = params.domain_root;
+ actual_bucket = zone.domain_root;
}
int r = open_bucket_ctx(actual_bucket, io_ctx);
@@ -2108,7 +2108,7 @@ int RGWRados::set_attr(void *ctx, rgw_obj& obj, const char *name, bufferlist& bl
if (actual_obj.size() == 0) {
actual_obj = bucket.name;
- actual_bucket = params.domain_root;
+ actual_bucket = zone.domain_root;
}
int r = open_bucket_ctx(actual_bucket, io_ctx);
@@ -2158,7 +2158,7 @@ int RGWRados::set_attrs(void *ctx, rgw_obj& obj,
if (actual_obj.size() == 0) {
actual_obj = bucket.name;
- actual_bucket = params.domain_root;
+ actual_bucket = zone.domain_root;
}
int r = open_bucket_ctx(actual_bucket, io_ctx);
@@ -3216,7 +3216,7 @@ int RGWRados::get_bucket_info(void *ctx, string& bucket_name, RGWBucketInfo& inf
{
bufferlist bl;
- int ret = rgw_get_obj(this, ctx, params.domain_root, bucket_name, bl, pattrs);
+ int ret = rgw_get_obj(this, ctx, zone.domain_root, bucket_name, bl, pattrs);
if (ret < 0) {
if (ret != -ENOENT)
return ret;
@@ -3245,7 +3245,7 @@ int RGWRados::put_bucket_info(string& bucket_name, RGWBucketInfo& info, bool exc
::encode(info, bl);
- int ret = rgw_put_system_obj(this, params.domain_root, bucket_name, bl.c_str(), bl.length(), exclusive, pattrs);
+ int ret = rgw_put_system_obj(this, zone.domain_root, bucket_name, bl.c_str(), bl.length(), exclusive, pattrs);
return ret;
}
@@ -3626,7 +3626,7 @@ int RGWRados::cls_obj_usage_log_add(const string& oid, rgw_usage_log_info& info)
{
librados::IoCtx io_ctx;
- const char *usage_log_pool = params.usage_log_pool.name.c_str();
+ const char *usage_log_pool = zone.usage_log_pool.name.c_str();
int r = rados->ioctx_create(usage_log_pool, io_ctx);
if (r == -ENOENT) {
rgw_bucket pool(usage_log_pool);
@@ -3654,7 +3654,7 @@ int RGWRados::cls_obj_usage_log_read(string& oid, string& user, uint64_t start_e
*is_truncated = false;
- const char *usage_log_pool = params.usage_log_pool.name.c_str();
+ const char *usage_log_pool = zone.usage_log_pool.name.c_str();
int r = rados->ioctx_create(usage_log_pool, io_ctx);
if (r < 0)
return r;
@@ -3669,7 +3669,7 @@ int RGWRados::cls_obj_usage_log_trim(string& oid, string& user, uint64_t start_e
{
librados::IoCtx io_ctx;
- const char *usage_log_pool = params.usage_log_pool.name.c_str();
+ const char *usage_log_pool = zone.usage_log_pool.name.c_str();
int r = rados->ioctx_create(usage_log_pool, io_ctx);
if (r < 0)
return r;
@@ -3889,7 +3889,7 @@ int RGWRados::remove_temp_objects(string date, string time)
bool is_truncated;
IntentLogNameFilter filter(date.c_str(), &tm);
RGWPoolIterCtx iter_ctx;
- int r = pool_iterate_begin(params.intent_log_pool, iter_ctx);
+ int r = pool_iterate_begin(zone.intent_log_pool, iter_ctx);
if (r < 0) {
cerr << "failed to list objects" << std::endl;
return r;
@@ -3904,7 +3904,7 @@ int RGWRados::remove_temp_objects(string date, string time)
}
vector<RGWObjEnt>::iterator iter;
for (iter = objs.begin(); iter != objs.end(); ++iter) {
- process_intent_log(params.intent_log_pool, (*iter).name, epoch, I_DEL_OBJ | I_DEL_DIR, true);
+ process_intent_log(zone.intent_log_pool, (*iter).name, epoch, I_DEL_OBJ | I_DEL_DIR, true);
}
} while (is_truncated);
diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
index 49df684d5f4..1deb2ac1487 100644
--- a/src/rgw/rgw_rados.h
+++ b/src/rgw/rgw_rados.h
@@ -238,7 +238,7 @@ struct RGWPoolIterCtx {
librados::ObjectIterator iter;
};
-struct RGWRadosParams {
+struct RGWZoneParams {
rgw_bucket domain_root;
rgw_bucket control_pool;
rgw_bucket gc_pool;
@@ -287,7 +287,7 @@ struct RGWRadosParams {
void dump(Formatter *f) const;
void decode_json(JSONObj *obj);
};
-WRITE_CLASS_ENCODER(RGWRadosParams);
+WRITE_CLASS_ENCODER(RGWZoneParams);
class RGWRados
{
@@ -392,7 +392,7 @@ public:
cct(NULL), rados(NULL),
pools_initialized(false) {}
- RGWRadosParams params;
+ RGWZoneParams zone;
virtual ~RGWRados() {
if (rados) {
diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc
index e4dbb56319e..df5c514ad6a 100644
--- a/src/rgw/rgw_user.cc
+++ b/src/rgw/rgw_user.cc
@@ -82,14 +82,14 @@ int rgw_store_user_info(RGWRados *store, RGWUserInfo& info, RGWUserInfo *old_inf
::encode(ui, data_bl);
::encode(info, data_bl);
- ret = rgw_put_system_obj(store, store->params.user_uid_pool, info.user_id, data_bl.c_str(), data_bl.length(), exclusive);
+ ret = rgw_put_system_obj(store, store->zone.user_uid_pool, info.user_id, data_bl.c_str(), data_bl.length(), exclusive);
if (ret < 0)
return ret;
if (info.user_email.size()) {
if (!old_info ||
old_info->user_email.compare(info.user_email) != 0) { /* only if new index changed */
- ret = rgw_put_system_obj(store, store->params.user_email_pool, info.user_email, link_bl.c_str(), link_bl.length(), exclusive);
+ ret = rgw_put_system_obj(store, store->zone.user_email_pool, info.user_email, link_bl.c_str(), link_bl.length(), exclusive);
if (ret < 0)
return ret;
}
@@ -102,7 +102,7 @@ int rgw_store_user_info(RGWRados *store, RGWUserInfo& info, RGWUserInfo *old_inf
if (old_info && old_info->access_keys.count(iter->first) != 0)
continue;
- ret = rgw_put_system_obj(store, store->params.user_keys_pool, k.id, link_bl.c_str(), link_bl.length(), exclusive);
+ ret = rgw_put_system_obj(store, store->zone.user_keys_pool, k.id, link_bl.c_str(), link_bl.length(), exclusive);
if (ret < 0)
return ret;
}
@@ -114,7 +114,7 @@ int rgw_store_user_info(RGWRados *store, RGWUserInfo& info, RGWUserInfo *old_inf
if (old_info && old_info->swift_keys.count(siter->first) != 0)
continue;
- ret = rgw_put_system_obj(store, store->params.user_swift_pool, k.id, link_bl.c_str(), link_bl.length(), exclusive);
+ ret = rgw_put_system_obj(store, store->zone.user_swift_pool, k.id, link_bl.c_str(), link_bl.length(), exclusive);
if (ret < 0)
return ret;
}
@@ -152,7 +152,7 @@ int rgw_get_user_info_by_uid(RGWRados *store, string& uid, RGWUserInfo& info)
bufferlist bl;
RGWUID user_id;
- int ret = rgw_get_obj(store, NULL, store->params.user_uid_pool, uid, bl);
+ int ret = rgw_get_obj(store, NULL, store->zone.user_uid_pool, uid, bl);
if (ret < 0)
return ret;
@@ -180,7 +180,7 @@ int rgw_get_user_info_by_uid(RGWRados *store, string& uid, RGWUserInfo& info)
*/
int rgw_get_user_info_by_email(RGWRados *store, string& email, RGWUserInfo& info)
{
- return rgw_get_user_info_from_index(store, email, store->params.user_email_pool, info);
+ return rgw_get_user_info_from_index(store, email, store->zone.user_email_pool, info);
}
/**
@@ -189,7 +189,7 @@ int rgw_get_user_info_by_email(RGWRados *store, string& email, RGWUserInfo& info
*/
extern int rgw_get_user_info_by_swift(RGWRados *store, string& swift_name, RGWUserInfo& info)
{
- return rgw_get_user_info_from_index(store, swift_name, store->params.user_swift_pool, info);
+ return rgw_get_user_info_from_index(store, swift_name, store->zone.user_swift_pool, info);
}
/**
@@ -198,7 +198,7 @@ extern int rgw_get_user_info_by_swift(RGWRados *store, string& swift_name, RGWUs
*/
extern int rgw_get_user_info_by_access_key(RGWRados *store, string& access_key, RGWUserInfo& info)
{
- return rgw_get_user_info_from_index(store, access_key, store->params.user_keys_pool, info);
+ return rgw_get_user_info_from_index(store, access_key, store->zone.user_keys_pool, info);
}
static void get_buckets_obj(string& user_id, string& buckets_obj_id)
@@ -210,7 +210,7 @@ static void get_buckets_obj(string& user_id, string& buckets_obj_id)
static int rgw_read_buckets_from_attr(RGWRados *store, string& user_id, RGWUserBuckets& buckets)
{
bufferlist bl;
- rgw_obj obj(store->params.user_uid_pool, user_id);
+ rgw_obj obj(store->zone.user_uid_pool, user_id);
int ret = store->get_attr(NULL, obj, RGW_ATTR_BUCKETS, bl);
if (ret)
return ret;
@@ -237,7 +237,7 @@ int rgw_read_user_buckets(RGWRados *store, string user_id, RGWUserBuckets& bucke
string buckets_obj_id;
get_buckets_obj(user_id, buckets_obj_id);
bufferlist bl;
- rgw_obj obj(store->params.user_uid_pool, buckets_obj_id);
+ rgw_obj obj(store->zone.user_uid_pool, buckets_obj_id);
bufferlist header;
map<string,bufferlist> m;
@@ -290,7 +290,7 @@ int rgw_write_buckets_attr(RGWRados *store, string user_id, RGWUserBuckets& buck
bufferlist bl;
buckets.encode(bl);
- rgw_obj obj(store->params.user_uid_pool, user_id);
+ rgw_obj obj(store->zone.user_uid_pool, user_id);
int ret = store->set_attr(NULL, obj, RGW_ATTR_BUCKETS, bl);
@@ -314,7 +314,7 @@ int rgw_add_bucket(RGWRados *store, string user_id, rgw_bucket& bucket)
string buckets_obj_id;
get_buckets_obj(user_id, buckets_obj_id);
- rgw_obj obj(store->params.user_uid_pool, buckets_obj_id);
+ rgw_obj obj(store->zone.user_uid_pool, buckets_obj_id);
ret = store->omap_set(obj, bucket_name, bl);
if (ret < 0) {
ldout(store->ctx(), 0) << "ERROR: error adding bucket to directory: "
@@ -355,7 +355,7 @@ int rgw_remove_user_bucket_info(RGWRados *store, string user_id, rgw_bucket& buc
string buckets_obj_id;
get_buckets_obj(user_id, buckets_obj_id);
- rgw_obj obj(store->params.user_uid_pool, buckets_obj_id);
+ rgw_obj obj(store->zone.user_uid_pool, buckets_obj_id);
ret = store->omap_del(obj, bucket.name);
if (ret < 0) {
ldout(store->ctx(), 0) << "ERROR: error removing bucket from directory: "
@@ -377,28 +377,28 @@ int rgw_remove_user_bucket_info(RGWRados *store, string user_id, rgw_bucket& buc
int rgw_remove_key_index(RGWRados *store, RGWAccessKey& access_key)
{
- rgw_obj obj(store->params.user_keys_pool, access_key.id);
+ rgw_obj obj(store->zone.user_keys_pool, access_key.id);
int ret = store->delete_obj(NULL, obj);
return ret;
}
int rgw_remove_uid_index(RGWRados *store, string& uid)
{
- rgw_obj obj(store->params.user_uid_pool, uid);
+ rgw_obj obj(store->zone.user_uid_pool, uid);
int ret = store->delete_obj(NULL, obj);
return ret;
}
int rgw_remove_email_index(RGWRados *store, string& email)
{
- rgw_obj obj(store->params.user_email_pool, email);
+ rgw_obj obj(store->zone.user_email_pool, email);
int ret = store->delete_obj(NULL, obj);
return ret;
}
int rgw_remove_swift_name_index(RGWRados *store, string& swift_name)
{
- rgw_obj obj(store->params.user_swift_pool, swift_name);
+ rgw_obj obj(store->zone.user_swift_pool, swift_name);
int ret = store->delete_obj(NULL, obj);
return ret;
}
@@ -445,7 +445,7 @@ int rgw_delete_user(RGWRados *store, RGWUserInfo& info) {
}
}
- rgw_obj email_obj(store->params.user_email_pool, info.user_email);
+ rgw_obj email_obj(store->zone.user_email_pool, info.user_email);
ldout(store->ctx(), 10) << "removing email index: " << info.user_email << dendl;
ret = store->delete_obj(NULL, email_obj);
if (ret < 0 && ret != -ENOENT) {
@@ -455,7 +455,7 @@ int rgw_delete_user(RGWRados *store, RGWUserInfo& info) {
string buckets_obj_id;
get_buckets_obj(info.user_id, buckets_obj_id);
- rgw_obj uid_bucks(store->params.user_uid_pool, buckets_obj_id);
+ rgw_obj uid_bucks(store->zone.user_uid_pool, buckets_obj_id);
ldout(store->ctx(), 10) << "removing user buckets index" << dendl;
ret = store->delete_obj(NULL, uid_bucks);
if (ret < 0 && ret != -ENOENT) {
@@ -463,7 +463,7 @@ int rgw_delete_user(RGWRados *store, RGWUserInfo& info) {
return ret;
}
- rgw_obj uid_obj(store->params.user_uid_pool, info.user_id);
+ rgw_obj uid_obj(store->zone.user_uid_pool, info.user_id);
ldout(store->ctx(), 10) << "removing user index: " << info.user_id << dendl;
ret = store->delete_obj(NULL, uid_obj);
if (ret < 0 && ret != -ENOENT) {