From: Sage Weil Date: Wed, 12 Apr 2017 02:50:05 +0000 (-0400) Subject: messages/MOSDFailure: drop compat cruft X-Git-Tag: v12.0.3~190^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=607ff0a7762097a19dc9a3fb39430227495fe08a;p=ceph.git messages/MOSDFailure: drop compat cruft v3 was 4f1792d7694e065e3bcdb48d94d66e936c390daf (bobtail?). Signed-off-by: Sage Weil --- diff --git a/src/messages/MOSDFailure.h b/src/messages/MOSDFailure.h index 9766522ef3ea..81a9230c5307 100644 --- a/src/messages/MOSDFailure.h +++ b/src/messages/MOSDFailure.h @@ -22,6 +22,7 @@ class MOSDFailure : public PaxosServiceMessage { static const int HEAD_VERSION = 3; + static const int COMPAT_VERSION = 3; public: enum { @@ -38,13 +39,13 @@ class MOSDFailure : public PaxosServiceMessage { MOSDFailure() : PaxosServiceMessage(MSG_OSD_FAILURE, 0, HEAD_VERSION) { } MOSDFailure(const uuid_d &fs, const entity_inst_t& f, int duration, epoch_t e) - : PaxosServiceMessage(MSG_OSD_FAILURE, e, HEAD_VERSION), + : PaxosServiceMessage(MSG_OSD_FAILURE, e, HEAD_VERSION, COMPAT_VERSION), fsid(fs), target_osd(f), flags(FLAG_FAILED), epoch(e), failed_for(duration) { } MOSDFailure(const uuid_d &fs, const entity_inst_t& f, int duration, epoch_t e, __u8 extra_flags) - : PaxosServiceMessage(MSG_OSD_FAILURE, e, HEAD_VERSION), + : PaxosServiceMessage(MSG_OSD_FAILURE, e, HEAD_VERSION, COMPAT_VERSION), fsid(fs), target_osd(f), flags(extra_flags), epoch(e), failed_for(duration) { } @@ -67,14 +68,8 @@ public: ::decode(fsid, p); ::decode(target_osd, p); ::decode(epoch, p); - if (header.version >= 2) - ::decode(flags, p); - else - flags = FLAG_FAILED; - if (header.version >= 3) - ::decode(failed_for, p); - else - failed_for = 0; + ::decode(flags, p); + ::decode(failed_for, p); } void encode_payload(uint64_t features) override {