From: Greg Farnum Date: Fri, 6 Dec 2013 21:13:03 +0000 (-0800) Subject: messages: make room for passing supported monitor commands in MMonElection X-Git-Tag: v0.75~125^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8025fb33add620cb89f795281067c5bddf0467b5;p=ceph.git messages: make room for passing supported monitor commands in MMonElection We're going to use this space to let leader tell everybody what commands it supports. Signed-off-by: Greg Farnum --- diff --git a/src/messages/MMonElection.h b/src/messages/MMonElection.h index 3d7dd4ec90ef..ea55bbdb4534 100644 --- a/src/messages/MMonElection.h +++ b/src/messages/MMonElection.h @@ -21,7 +21,7 @@ class MMonElection : public Message { - static const int HEAD_VERSION = 4; + static const int HEAD_VERSION = 5; static const int COMPAT_VERSION = 2; public: @@ -49,6 +49,7 @@ public: * on user cluster, so we've left them in for compatibility. */ version_t defunct_one; version_t defunct_two; + bufferlist commands; MMonElection() : Message(MSG_MON_ELECTION, HEAD_VERSION, COMPAT_VERSION), op(0), epoch(0), quorum_features(0), defunct_one(0), @@ -90,6 +91,7 @@ public: ::encode(quorum_features, payload); ::encode(defunct_one, payload); ::encode(defunct_two, payload); + ::encode(commands, payload); } void decode_payload() { bufferlist::iterator p = payload.begin(); @@ -109,6 +111,8 @@ public: ::decode(defunct_one, p); ::decode(defunct_two, p); } + if (header.version >= 5) + ::decode(commands, p); } };