From 3c028cfd308ce0e760b64d56b894586213fccba4 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 12 Apr 2017 09:19:34 -0400 Subject: [PATCH] osd/osd_types: remove pg_query_t compat cruft Signed-off-by: Sage Weil --- src/osd/osd_types.cc | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 145a0d76831..922d48c6ddd 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -3282,7 +3282,7 @@ ostream& operator<<(ostream& out, const pg_interval_t& i) // -- pg_query_t -- void pg_query_t::encode(bufferlist &bl, uint64_t features) const { - ENCODE_START(3, 2, bl); + ENCODE_START(3, 3, bl); ::encode(type, bl); ::encode(since, bl); history.encode(bl); @@ -3293,27 +3293,14 @@ void pg_query_t::encode(bufferlist &bl, uint64_t features) const { } void pg_query_t::decode(bufferlist::iterator &bl) { - bufferlist::iterator bl2 = bl; - try { - DECODE_START(3, bl); - ::decode(type, bl); - ::decode(since, bl); - history.decode(bl); - ::decode(epoch_sent, bl); - if (struct_v >= 3) { - ::decode(to, bl); - ::decode(from, bl); - } else { - to = shard_id_t::NO_SHARD; - from = shard_id_t::NO_SHARD; - } - DECODE_FINISH(bl); - } catch (...) { - bl = bl2; - ::decode(type, bl); - ::decode(since, bl); - history.decode(bl); - } + DECODE_START(3, bl); + ::decode(type, bl); + ::decode(since, bl); + history.decode(bl); + ::decode(epoch_sent, bl); + ::decode(to, bl); + ::decode(from, bl); + DECODE_FINISH(bl); } void pg_query_t::dump(Formatter *f) const -- 2.47.3