]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix json decode of bucket layout
authorCasey Bodley <cbodley@redhat.com>
Wed, 15 Apr 2020 13:21:11 +0000 (09:21 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 15 Apr 2020 13:21:15 +0000 (09:21 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_json_enc.cc

index 8083212e33b570f4f960c13df1751d1592d105da..230bdc73caef2e93b0d7ba61fde89656c7f70463 100644 (file)
@@ -818,7 +818,7 @@ void RGWBucketInfo::decode_json(JSONObj *obj) {
   JSONDecoder::decode_json("num_shards", layout.current_index.layout.normal.num_shards, obj);
   uint32_t hash_type;
   JSONDecoder::decode_json("bi_shard_hash_type", hash_type, obj);
-  layout.current_index.layout.normal.num_shards = (uint8_t)hash_type;
+  layout.current_index.layout.normal.hash_type = static_cast<rgw::BucketHashType>(hash_type);
   JSONDecoder::decode_json("requester_pays", requester_pays, obj);
   JSONDecoder::decode_json("has_website", has_website, obj);
   if (has_website) {