]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
messages/MOSDPGCreate: remove compat cruft
authorSage Weil <sage@redhat.com>
Wed, 12 Apr 2017 02:55:35 +0000 (22:55 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Apr 2017 20:00:39 +0000 (16:00 -0400)
v3 is 52cb44c4dde337924342bb99f8ca8d1265421077 (pre-hammer).

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

index e6f7aba895002f121519c23b06f86ed42784d80b..01072c267fd8ed2a625351e6e0db1366933d870b 100644 (file)
@@ -26,8 +26,7 @@
 struct MOSDPGCreate : public Message {
 
   const static int HEAD_VERSION = 3;
-  // At head_version 2 the unspecified compat_version was set to 2
-  const static int COMPAT_VERSION = 2;
+  const static int COMPAT_VERSION = 3;
 
   version_t          epoch;
   map<pg_t,pg_create_t> mkpg;
@@ -52,32 +51,8 @@ public:
   void decode_payload() override {
     bufferlist::iterator p = payload.begin();
     ::decode(epoch, p);
-    if (header.version >= 2) {
-      ::decode(mkpg, p);
-    } else {
-      __u32 n;
-      ::decode(n, p);
-      while (n--) {
-       pg_t pgid;
-       epoch_t created;   // epoch pg created
-       pg_t parent;       // split from parent (if != pg_t())
-       __s32 split_bits;
-       ::decode(pgid, p);
-       ::decode(created, p);
-       ::decode(parent, p);
-       ::decode(split_bits, p);
-       mkpg[pgid] = pg_create_t(created, parent, split_bits);
-      }
-    }
-    if (header.version >= 3) {
-      ::decode(ctimes, p);
-    } else {
-      // To make other code simpler create map with time of 0,0 for each pg
-      for (map<pg_t,pg_create_t>::const_iterator i = mkpg.begin();
-          i != mkpg.end(); ++i) {
-       ctimes[i->first] = utime_t();
-      }
-    }
+    ::decode(mkpg, p);
+    ::decode(ctimes, p);
   }
 
   void print(ostream& out) const override {