From: Yehuda Sadeh Date: Tue, 9 Oct 2018 00:28:41 +0000 (-0700) Subject: rgw: tiering fixes X-Git-Tag: v14.1.0~314^2~53 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a270c8b8565717bac2157d1cedb3fa93e4a784fc;p=ceph.git rgw: tiering fixes Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index ff54299ce3ee..34ca5dd60946 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -998,6 +998,7 @@ void RGWZoneStorageClasses::decode_json(JSONObj *obj) decode_json_obj(m[field.first], field_obj); } + standard_class = &m[RGW_STORAGE_CLASS_STANDARD]; } void RGWZonePlacementInfo::dump(Formatter *f) const diff --git a/src/rgw/rgw_zone.h b/src/rgw/rgw_zone.h index a7a1d13dfac5..22f638eecef9 100644 --- a/src/rgw/rgw_zone.h +++ b/src/rgw/rgw_zone.h @@ -179,10 +179,12 @@ class RGWZoneStorageClasses { map m; /* in memory only */ - RGWZoneStorageClass *standard_class{&m[RGW_STORAGE_CLASS_STANDARD]}; + RGWZoneStorageClass *standard_class; public: - RGWZoneStorageClasses() {} + RGWZoneStorageClasses() { + standard_class = &m[RGW_STORAGE_CLASS_STANDARD]; + } RGWZoneStorageClasses(const RGWZoneStorageClasses& rhs) { m = rhs.m; standard_class = &m[RGW_STORAGE_CLASS_STANDARD]; @@ -237,6 +239,7 @@ public: void decode(bufferlist::const_iterator& bl) { DECODE_START(1, bl); decode(m, bl); + standard_class = &m[RGW_STORAGE_CLASS_STANDARD]; DECODE_FINISH(bl); }