From: David Zafman Date: Thu, 13 Dec 2018 21:40:39 +0000 (-0800) Subject: osd: shard_info_wrapper encode/decode need to fall through to *_FINISH() X-Git-Tag: v14.1.0~599^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8da803d0de050d63ab7342c8f6d09dc13e20f83b;p=ceph.git osd: shard_info_wrapper encode/decode need to fall through to *_FINISH() Fixes: http://tracker.ceph.com/issues/37653 Signed-off-by: David Zafman --- diff --git a/src/common/scrub_types.cc b/src/common/scrub_types.cc index fa1f9a81049c..d0385138bbdb 100644 --- a/src/common/scrub_types.cc +++ b/src/common/scrub_types.cc @@ -74,16 +74,15 @@ void shard_info_wrapper::encode(bufferlist& bl) const ENCODE_START(3, 3, bl); encode(errors, bl); encode(primary, bl); - if (has_shard_missing()) { - return; + if (!has_shard_missing()) { + encode(attrs, bl); + encode(size, bl); + encode(omap_digest_present, bl); + encode(omap_digest, bl); + encode(data_digest_present, bl); + encode(data_digest, bl); + encode(selected_oi, bl); } - encode(attrs, bl); - encode(size, bl); - encode(omap_digest_present, bl); - encode(omap_digest, bl); - encode(data_digest_present, bl); - encode(data_digest, bl); - encode(selected_oi, bl); ENCODE_FINISH(bl); } @@ -92,16 +91,15 @@ void shard_info_wrapper::decode(bufferlist::const_iterator& bp) DECODE_START(3, bp); decode(errors, bp); decode(primary, bp); - if (has_shard_missing()) { - return; + if (!has_shard_missing()) { + decode(attrs, bp); + decode(size, bp); + decode(omap_digest_present, bp); + decode(omap_digest, bp); + decode(data_digest_present, bp); + decode(data_digest, bp); + decode(selected_oi, bp); } - decode(attrs, bp); - decode(size, bp); - decode(omap_digest_present, bp); - decode(omap_digest, bp); - decode(data_digest_present, bp); - decode(data_digest, bp); - decode(selected_oi, bp); DECODE_FINISH(bp); }