From: Adam C. Emerson Date: Fri, 14 May 2021 19:26:42 +0000 (-0400) Subject: rgw: Add cast from bucket_index_log_layout X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=634469f234a19afddbc2a8c98f91793be481fb57;p=ceph.git rgw: Add cast from bucket_index_log_layout To bucket_index_layout_generation Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/rgw_bucket_layout.h b/src/rgw/rgw_bucket_layout.h index 6ca62e233a521..ccc1595f8138c 100644 --- a/src/rgw/rgw_bucket_layout.h +++ b/src/rgw/rgw_bucket_layout.h @@ -69,7 +69,6 @@ void decode(bucket_index_layout& l, bufferlist::const_iterator& bl); void encode_json_impl(const char *name, const bucket_index_layout& l, ceph::Formatter *f); void decode_json_obj(bucket_index_layout& l, JSONObj *obj); - struct bucket_index_layout_generation { uint64_t gen = 0; bucket_index_layout layout; @@ -104,6 +103,13 @@ inline std::ostream& operator<<(std::ostream& out, const BucketLogType &log_type struct bucket_index_log_layout { uint64_t gen = 0; bucket_index_normal_layout layout; + operator bucket_index_layout_generation() const { + bucket_index_layout_generation bilg; + bilg.gen = gen; + bilg.layout.type = BucketIndexType::Normal; + bilg.layout.normal = layout; + return bilg; + } }; void encode(const bucket_index_log_layout& l, bufferlist& bl, uint64_t f=0); @@ -122,7 +128,6 @@ void decode(bucket_log_layout& l, bufferlist::const_iterator& bl); void encode_json_impl(const char *name, const bucket_log_layout& l, ceph::Formatter *f); void decode_json_obj(bucket_log_layout& l, JSONObj *obj); - struct bucket_log_layout_generation { uint64_t gen = 0; bucket_log_layout layout;