]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: remove pg_query_t compat cruft
authorSage Weil <sage@redhat.com>
Wed, 12 Apr 2017 13:19:34 +0000 (09:19 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Apr 2017 20:00:40 +0000 (16:00 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/osd_types.cc

index 145a0d76831a4b59f525ad52fea07dfb714e7117..922d48c6ddd8fcdf2537184d26200aa7def9eed9 100644 (file)
@@ -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