]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgwlc: fix conditional decode of legacy lc op structures 36018/head
authorMatt Benjamin <mbenjamin@redhat.com>
Wed, 5 Aug 2020 14:45:45 +0000 (10:45 -0400)
committerNathan Cutler <ncutler@suse.com>
Sun, 9 Aug 2020 20:51:47 +0000 (22:51 +0200)
Fixes the case where an upgraded radosgw operates on an unupgraded
OSD, so likely these cases do not execute.

Fixes: https://tracker.ceph.com/issues/46838
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 3814ff2cc4503330d7094bcdcaf7c5ea630ce5b9)

src/cls/rgw/cls_rgw_ops.h

index a52777b83a7613483cdb2f367d0ed2fd0238fc87..873acf070d8fd2a845b2344e236e9afd485f477c 100644 (file)
@@ -1043,7 +1043,7 @@ struct cls_rgw_lc_get_next_entry_ret {
 
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START(2, bl);
-    if (struct_v < 1) {
+    if (struct_v < 2) {
       std::pair<std::string, int> oe;
       decode(oe, bl);
       entry = {oe.first, 0 /* start */, uint32_t(oe.second)};
@@ -1109,7 +1109,7 @@ struct cls_rgw_lc_rm_entry_op {
 
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START(2, bl);
-    if (struct_v < 1) {
+    if (struct_v < 2) {
       std::pair<std::string, int> oe;
       decode(oe, bl);
       entry = {oe.first, 0 /* start */, uint32_t(oe.second)};
@@ -1133,7 +1133,7 @@ struct cls_rgw_lc_set_entry_op {
 
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START(2, bl);
-    if (struct_v < 1) {
+    if (struct_v < 2) {
       std::pair<std::string, int> oe;
       decode(oe, bl);
       entry = {oe.first, 0 /* start */, uint32_t(oe.second)};