If it's standard storage class, don't avoid encoding it,
otherwise we can't know if it was set or not.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
void encode(bufferlist& bl) const {
/* no ENCODE_START/END due to backward compatibility */
- std::string s = to_str();
+ std::string s = to_str_explicit();
ceph::encode(s, bl);
}
if (standard_storage_class()) {
return name;
}
+ return to_str_explicit();
+ }
+
+ std::string to_str_explicit() const {
return name + "/" + storage_class;
}