]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages/MOSDFailure: drop compat cruft
authorSage Weil <sage@redhat.com>
Wed, 12 Apr 2017 02:50:05 +0000 (22:50 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Apr 2017 20:00:39 +0000 (16:00 -0400)
v3 was 4f1792d7694e065e3bcdb48d94d66e936c390daf (bobtail?).

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

index 9766522ef3eade67152a6b4134acc8957ccfebef..81a9230c53078b76234cb2077f3a7805b3e5a9ac 100644 (file)
@@ -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 {