From 3814ff2cc4503330d7094bcdcaf7c5ea630ce5b9 Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Wed, 5 Aug 2020 10:45:45 -0400 Subject: [PATCH] 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 --- src/cls/rgw/cls_rgw_ops.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cls/rgw/cls_rgw_ops.h b/src/cls/rgw/cls_rgw_ops.h index ae02c192eca..a1800a834b4 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(ceph::buffer::list::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(ceph::buffer::list::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(ceph::buffer::list::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)}; -- 2.47.3