]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove RGWBucketInfo::BIShardsHashType enum 34570/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 15 Apr 2020 14:09:52 +0000 (10:09 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 15 Apr 2020 14:09:52 +0000 (10:09 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_common.h
src/rgw/services/svc_bi_rados.cc
src/rgw/services/svc_bi_rados.h

index 3dd53ddf234707bb468286179018ffef9ec286b7..f21944011066e4d86371f6de5abad144ce258ae2 100644 (file)
@@ -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};
index 0aa71ea507ef33a7bc708119cf7b721aeb3cb27c..494d7094d271d7cd4db3f7989576e8e05e246c02 100644 (file)
@@ -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;
index d59d3606a96ff2d2174509921eadc1403eb4a8c2..87387d7ca0803ea6b969fac6be7fd24d147ce2e3 100644 (file)
@@ -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,