From: Casey Bodley Date: Wed, 15 Apr 2020 14:09:52 +0000 (-0400) Subject: rgw: remove RGWBucketInfo::BIShardsHashType enum X-Git-Tag: v16.1.0~2522^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34570%2Fhead;p=ceph.git rgw: remove RGWBucketInfo::BIShardsHashType enum Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 3dd53ddf2347..f21944011066 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -1094,10 +1094,6 @@ enum RGWBucketFlags { class RGWSI_Zone; struct RGWBucketInfo { - enum BIShardsHashType { - MOD = 0 - }; - rgw_bucket bucket; rgw_user owner; uint32_t flags{0}; diff --git a/src/rgw/services/svc_bi_rados.cc b/src/rgw/services/svc_bi_rados.cc index 0aa71ea507ef..494d7094d271 100644 --- a/src/rgw/services/svc_bi_rados.cc +++ b/src/rgw/services/svc_bi_rados.cc @@ -200,12 +200,12 @@ void RGWSI_BucketIndex_RADOS::get_bucket_index_object(const string& bucket_oid_b } int RGWSI_BucketIndex_RADOS::get_bucket_index_object(const string& bucket_oid_base, const string& obj_key, - uint32_t num_shards, RGWBucketInfo::BIShardsHashType hash_type, + uint32_t num_shards, rgw::BucketHashType hash_type, string *bucket_obj, int *shard_id) { int r = 0; switch (hash_type) { - case RGWBucketInfo::MOD: + case rgw::BucketHashType::Mod: if (!num_shards) { // By default with no sharding, we use the bucket oid as itself (*bucket_obj) = bucket_oid_base; @@ -247,7 +247,7 @@ int RGWSI_BucketIndex_RADOS::open_bucket_index_shard(const RGWBucketInfo& bucket string oid; ret = get_bucket_index_object(bucket_oid_base, obj_key, bucket_info.layout.current_index.layout.normal.num_shards, - (RGWBucketInfo::BIShardsHashType)bucket_info.layout.current_index.layout.normal.hash_type, &oid, shard_id); + bucket_info.layout.current_index.layout.normal.hash_type, &oid, shard_id); if (ret < 0) { ldout(cct, 10) << "get_bucket_index_object() returned ret=" << ret << dendl; return ret; diff --git a/src/rgw/services/svc_bi_rados.h b/src/rgw/services/svc_bi_rados.h index d59d3606a96f..87387d7ca080 100644 --- a/src/rgw/services/svc_bi_rados.h +++ b/src/rgw/services/svc_bi_rados.h @@ -52,7 +52,7 @@ class RGWSI_BucketIndex_RADOS : public RGWSI_BucketIndex int shard_id, string *bucket_obj); int get_bucket_index_object(const string& bucket_oid_base, const string& obj_key, - uint32_t num_shards, RGWBucketInfo::BIShardsHashType hash_type, + uint32_t num_shards, rgw::BucketHashType hash_type, string *bucket_obj, int *shard_id); int cls_bucket_head(const RGWBucketInfo& bucket_info,