From: Yehuda Sadeh Date: Thu, 25 Oct 2018 22:28:57 +0000 (-0700) Subject: rgw: tiering: encode standard storage_class in rule explicitly X-Git-Tag: v14.1.0~314^2~41 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dcc3c0c87337b54afa20e7db85ede84e9661f471;p=ceph.git rgw: tiering: encode standard storage_class in rule explicitly 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 --- diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 07fe1eff5b9..15348251074 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -719,7 +719,7 @@ struct rgw_placement_rule { 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); } @@ -733,6 +733,10 @@ struct rgw_placement_rule { if (standard_storage_class()) { return name; } + return to_str_explicit(); + } + + std::string to_str_explicit() const { return name + "/" + storage_class; }