rgw: tiering fixes

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
Yehuda Sadeh 2018-10-08 17:28:41 -07:00
parent ab639f2d0f
commit a270c8b856
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -179,10 +179,12 @@ class RGWZoneStorageClasses {
map<string, RGWZoneStorageClass> 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);
}