]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages/MOSDPGPull: remove compat cruft
authorSage Weil <sage@redhat.com>
Wed, 12 Apr 2017 02:57:39 +0000 (22:57 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Apr 2017 20:00:39 +0000 (16:00 -0400)
v2 was 8b46dd1dc009981f2fcae7b0e05155e81841c4a5 (pre-firefly).

Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MOSDPGPush.h
src/messages/MOSDPGPushReply.h

index 9842ef06945f91fc06feb7fa5e138d3f3383876c..50abe8475c2a1cf9539f9ed35027524af5156ea4 100644 (file)
@@ -19,8 +19,7 @@
 
 class MOSDPGPush : public MOSDFastDispatchOp {
   static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
-
+  static const int COMPAT_VERSION = 2;
 
 public:
   pg_shard_t from;
@@ -67,13 +66,8 @@ public:
     ::decode(map_epoch, p);
     ::decode(pushes, p);
     ::decode(cost, p);
-    if (header.version >= 2) {
-      ::decode(pgid.shard, p);
-      ::decode(from, p);
-    } else {
-      pgid.shard = shard_id_t::NO_SHARD;
-      from = pg_shard_t(get_source().num(), shard_id_t::NO_SHARD);
-    }
+    ::decode(pgid.shard, p);
+    ::decode(from, p);
   }
 
   void encode_payload(uint64_t features) override {
index 180a201eb9ecc5baacd2172438fa97b2f4c06a31..3ac5467a2fef27882ed5e8d34c404305d7be4c48 100644 (file)
@@ -19,7 +19,7 @@
 
 class MOSDPGPushReply : public MOSDFastDispatchOp {
   static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static const int COMPAT_VERSION = 2;
 
 public:
   pg_shard_t from;
@@ -59,14 +59,8 @@ public:
     ::decode(map_epoch, p);
     ::decode(replies, p);
     ::decode(cost, p);
-
-    if (header.version >= 2) {
-      ::decode(pgid.shard, p);
-      ::decode(from, p);
-    } else {
-      pgid.shard = shard_id_t::NO_SHARD;
-      from = pg_shard_t(get_source().num(), shard_id_t::NO_SHARD);
-    }
+    ::decode(pgid.shard, p);
+    ::decode(from, p);
   }
 
   void encode_payload(uint64_t features) override {