From: Yuri Weinstein Date: Wed, 13 Dec 2023 15:40:08 +0000 (-0800) Subject: Merge pull request #52210 from ceph/wip-nitzan-ceph-dencoder-extend-common-types... X-Git-Tag: testing/wip-batrick-testing-20240411.154038~797 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=bf0b10213584b00710526049b7c7b455309f4639;p=ceph-ci.git Merge pull request #52210 from ceph/wip-nitzan-ceph-dencoder-extend-common-types-available ceph-dencoder: COMMON - Add missing types Reviewed-by: Radoslaw Zarzynski --- bf0b10213584b00710526049b7c7b455309f4639 diff --cc src/cls/queue/cls_queue_ops.h index f41572036c5,0b0b30b6f01..25bf1200c54 --- a/src/cls/queue/cls_queue_ops.h +++ b/src/cls/queue/cls_queue_ops.h @@@ -52,9 -77,8 +77,9 @@@ struct cls_queue_enqueue_op WRITE_CLASS_ENCODER(cls_queue_enqueue_op) struct cls_queue_list_op { - uint64_t max; + uint64_t max{0}; std::string start_marker; + std::string end_marker; cls_queue_list_op() {} @@@ -67,14 -90,23 +92,26 @@@ } void decode(ceph::buffer::list::const_iterator& bl) { - DECODE_START(1, bl); + DECODE_START(2, bl); decode(max, bl); decode(start_marker, bl); + if (struct_v > 1) { + decode(end_marker, bl); + } DECODE_FINISH(bl); } + + void dump(ceph::Formatter *f) const { + f->dump_unsigned("max", max); + f->dump_string("start_marker", start_marker); + } + + static void generate_test_instances(std::list& o) { + o.push_back(new cls_queue_list_op); + o.push_back(new cls_queue_list_op); + o.back()->max = 123; + o.back()->start_marker = "foo"; + } }; WRITE_CLASS_ENCODER(cls_queue_list_op)