From: Matt Benjamin Date: Wed, 5 Aug 2020 14:45:45 +0000 (-0400) Subject: rgwlc: fix conditional decode of legacy lc op structures X-Git-Tag: v15.2.5~56^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=91ae330a43f7d45e91a81dfaf0366f64eef615d1;p=ceph.git rgwlc: fix conditional decode of legacy lc op structures 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 (cherry picked from commit 3814ff2cc4503330d7094bcdcaf7c5ea630ce5b9) --- diff --git a/src/cls/rgw/cls_rgw_ops.h b/src/cls/rgw/cls_rgw_ops.h index a52777b83a76..873acf070d8f 100644 --- a/src/cls/rgw/cls_rgw_ops.h +++ b/src/cls/rgw/cls_rgw_ops.h @@ -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 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 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 oe; decode(oe, bl); entry = {oe.first, 0 /* start */, uint32_t(oe.second)};