From 9c8a82c9ad2805fb6af250c46934b3b2aa056a1d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 11 Apr 2017 22:55:35 -0400 Subject: [PATCH] messages/MOSDPGCreate: remove compat cruft v3 is 52cb44c4dde337924342bb99f8ca8d1265421077 (pre-hammer). Signed-off-by: Sage Weil --- src/messages/MOSDPGCreate.h | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/src/messages/MOSDPGCreate.h b/src/messages/MOSDPGCreate.h index e6f7aba8950..01072c267fd 100644 --- a/src/messages/MOSDPGCreate.h +++ b/src/messages/MOSDPGCreate.h @@ -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 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::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 { -- 2.39.5