]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: define HEAD_VERSION and COMPAT_VERSION inlined 23623/head
authorKefu Chai <kchai@redhat.com>
Fri, 17 Aug 2018 09:14:28 +0000 (17:14 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 17 Aug 2018 10:59:29 +0000 (18:59 +0800)
otherwise we could have ../lib/libceph-common.so.0: undefined reference
to `MOSDPGNotify::HEAD_VERSION

when the compiler tries to be smart and pass them by reference.

Signed-off-by: Kefu Chai <kchai@redhat.com>
78 files changed:
src/messages/MBackfillReserve.h
src/messages/MClientCapRelease.h
src/messages/MClientCaps.h
src/messages/MClientReconnect.h
src/messages/MClientRequest.h
src/messages/MClientSession.h
src/messages/MConfig.h
src/messages/MDataPing.h
src/messages/MDiscoverReply.h
src/messages/MExportCaps.h
src/messages/MForward.h
src/messages/MGetConfig.h
src/messages/MMDSBeacon.h
src/messages/MMDSCacheRejoin.h
src/messages/MMDSMap.h
src/messages/MMDSSlaveRequest.h
src/messages/MMgrBeacon.h
src/messages/MMgrClose.h
src/messages/MMgrConfigure.h
src/messages/MMgrOpen.h
src/messages/MMgrReport.h
src/messages/MMonElection.h
src/messages/MMonGetVersionReply.h
src/messages/MMonHealth.h
src/messages/MMonHealthChecks.h
src/messages/MMonMetadata.h
src/messages/MMonMgrReport.h
src/messages/MMonPaxos.h
src/messages/MMonProbe.h
src/messages/MMonScrub.h
src/messages/MMonSubscribe.h
src/messages/MMonSync.h
src/messages/MNop.h
src/messages/MOSDBoot.h
src/messages/MOSDECSubOpRead.h
src/messages/MOSDECSubOpReadReply.h
src/messages/MOSDECSubOpWrite.h
src/messages/MOSDECSubOpWriteReply.h
src/messages/MOSDFailure.h
src/messages/MOSDForceRecovery.h
src/messages/MOSDMap.h
src/messages/MOSDMarkMeDown.h
src/messages/MOSDOp.h
src/messages/MOSDOpReply.h
src/messages/MOSDPGBackfill.h
src/messages/MOSDPGBackfillRemove.h
src/messages/MOSDPGCreate.h
src/messages/MOSDPGCreate2.h
src/messages/MOSDPGInfo.h
src/messages/MOSDPGLog.h
src/messages/MOSDPGNotify.h
src/messages/MOSDPGPull.h
src/messages/MOSDPGPush.h
src/messages/MOSDPGPushReply.h
src/messages/MOSDPGQuery.h
src/messages/MOSDPGRecoveryDelete.h
src/messages/MOSDPGRecoveryDeleteReply.h
src/messages/MOSDPGRemove.h
src/messages/MOSDPGScan.h
src/messages/MOSDPGTrim.h
src/messages/MOSDPGUpdateLogMissing.h
src/messages/MOSDPGUpdateLogMissingReply.h
src/messages/MOSDPing.h
src/messages/MOSDRepOp.h
src/messages/MOSDRepOpReply.h
src/messages/MOSDRepScrub.h
src/messages/MOSDRepScrubMap.h
src/messages/MOSDScrub.h
src/messages/MOSDScrub2.h
src/messages/MOSDScrubReserve.h
src/messages/MPoolOp.h
src/messages/MRecoveryReserve.h
src/messages/MRoute.h
src/messages/MStatfs.h
src/messages/MTimeCheck.h
src/messages/MTimeCheck2.h
src/messages/MWatchNotify.h
src/mon/mon_types.h

index b8d64f825e30451bb59513cf287ecf6478b82cf6..c9c1f6bcac194c3f7b759b9e5f2f7db426f3d4ee 100644 (file)
@@ -22,8 +22,8 @@ class MBackfillReserve : public MessageInstance<MBackfillReserve, MOSDPeeringOp>
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 4;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 4;
 public:
   spg_t pgid;
   epoch_t query_epoch;
index 8106d621c640bae3b1d83a4df191cdc730741a4f..76a4aae17d703ef611bd625bdc4b51a9beda38c2 100644 (file)
@@ -23,8 +23,8 @@ public:
   friend factory;
 
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
  public:
 
   struct ceph_mds_cap_release head;
index 38abc02437bac35a67be13d17a09c922f8d7e291..c48c478f0f1d11018c89c8205063038405017c13 100644 (file)
@@ -23,13 +23,13 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 11;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 11;
+  static constexpr int COMPAT_VERSION = 1;
 
  public:
-  static const unsigned FLAG_SYNC              = (1<<0);
-  static const unsigned FLAG_NO_CAPSNAP                = (1<<1); // unused
-  static const unsigned FLAG_PENDING_CAPSNAP   = (1<<2);
+  static constexpr unsigned FLAG_SYNC          = (1<<0);
+  static constexpr unsigned FLAG_NO_CAPSNAP            = (1<<1); // unused
+  static constexpr unsigned FLAG_PENDING_CAPSNAP       = (1<<2);
 
   struct ceph_mds_caps_head head;
 
index 96e9b210e845dc044fbc91781e0755fe778088cc..47ac931c9df6fde7bc8e6f7b4f53db772c008489 100644 (file)
@@ -24,7 +24,7 @@ class MClientReconnect : public MessageInstance<MClientReconnect> {
 public:
   friend factory;
 private:
-  const static int HEAD_VERSION = 3;
+  static constexpr int HEAD_VERSION = 3;
 
 public:
   map<inodeno_t, cap_reconnect_t>  caps;   // only head inodes
index f190979a9c50ecad7bf3f0f514b0cd2c4387ce4b..d109ca59b5b581465b3457efdea5a74dd36c4672 100644 (file)
@@ -52,8 +52,8 @@ class MClientRequest : public MessageInstance<MClientRequest> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   mutable struct ceph_mds_request_head head; /* XXX HACK! */
index a672812fc29d5dce2ac53d8625b4502238e70e1c..9fa79cf9fb89fe60335aca04c62ea45c969b4ee8 100644 (file)
@@ -22,8 +22,8 @@ class MClientSession : public MessageInstance<MClientSession> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   ceph_mds_session_head head;
index ca79b9aa39ef77042253b8c345dcf517726c8049..ab5d6a94b3726e9a5a07502dcb68c0fffbd3ff4c 100644 (file)
@@ -9,8 +9,8 @@ class MConfig : public MessageInstance<MConfig> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   map<string,string> config;
 
index 664e7ebcbbe20b268dedb04b04cc0fa0ae289ee4..b05d06c8c90fcdcd6783ac423e1ad283f3a49b10 100644 (file)
@@ -32,8 +32,8 @@ class MDataPing : public MessageInstance<MDataPing> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   std::string tag;
   uint32_t counter = 0;
index a25fa135a6d16d456f0d1ac6bf8ebacb714c58ca..c5ab5c81e7d274901663df1c1347680013ca6bad 100644 (file)
@@ -67,7 +67,7 @@ class MDiscoverReply : public MessageInstance<MDiscoverReply> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
 
   // info about original request
   inodeno_t base_ino;
index 0b91f48ac4b6ba26d5530afd23a9250a93441f06..006a37526ae4fc4da5e96cd9d113c05f86086bde 100644 (file)
@@ -23,9 +23,9 @@ class MExportCaps : public MessageInstance<MExportCaps> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
- public:  
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
+public:
   inodeno_t ino;
   bufferlist cap_bl;
   map<client_t,entity_inst_t> client_map;
index 9b34c086f95ac7c66ea13b3c971aae0c49acb434..2067d52a1934c9d5fc4498a62d38ce5903012a10 100644 (file)
@@ -39,8 +39,8 @@ public:
 
   string msg_desc;  // for operator<< only
   
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 4;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 4;
 
   MForward() : MessageInstance(MSG_FORWARD, HEAD_VERSION, COMPAT_VERSION),
                tid(0), con_features(0), msg(NULL) {}
index 11fc6c6fabbc6d65f5bc49559533d7b2edba8f36..2bbf1170373c1b6cc418bd469b47876d45c4ce6f 100644 (file)
@@ -9,8 +9,8 @@ class MGetConfig : public MessageInstance<MGetConfig> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   EntityName name;  ///< e.g., mon.a, client.foo
   string host;      ///< our hostname
index e72e20d1068af718f77c22cf80c92fd872e42b15..6e1433d614cd5377ed2a524574cb0c69d5639876 100644 (file)
@@ -184,8 +184,8 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 7;
-  static const int COMPAT_VERSION = 6;
+  static constexpr int HEAD_VERSION = 7;
+  static constexpr int COMPAT_VERSION = 6;
 
   uuid_d fsid;
   mds_gid_t global_id;
index 66e788b0bd7a9d895a777aad174647ff5e2cce60..3eef9f717c16d3fc0402af1c68cc55f08602e008 100644 (file)
@@ -32,13 +32,13 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
  public:
-  static const int OP_WEAK    = 1;  // replica -> auth, i exist, + maybe open files.
-  static const int OP_STRONG  = 2;  // replica -> auth, i exist, + open files and lock state.
-  static const int OP_ACK     = 3;  // auth -> replica, here is your lock state.
+  static constexpr int OP_WEAK    = 1;  // replica -> auth, i exist, + maybe open files.
+  static constexpr int OP_STRONG  = 2;  // replica -> auth, i exist, + open files and lock state.
+  static constexpr int OP_ACK     = 3;  // auth -> replica, here is your lock state.
   static const char *get_opname(int op) {
     switch (op) {
     case OP_WEAK: return "weak";
index 482d32a5b1cba4cabd9d025f11eee311ea8bc80a..2fef2beb53d7013c3eb1dbee275a315224b2adfc 100644 (file)
@@ -24,9 +24,8 @@ class MMDSMap : public MessageInstance<MMDSMap> {
 public:
   friend factory;
 private:
-
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 public:
   uuid_d fsid;
   epoch_t epoch = 0;
index 9e80aff627f858d0170c11c5fa7c7df065fe500d..97e7cfd07a95764bebf0a2c75102675c53ee83c6 100644 (file)
@@ -23,39 +23,39 @@ class MMDSSlaveRequest : public MessageInstance<MMDSSlaveRequest> {
 public:
   friend factory;
 
-  static const int OP_XLOCK =       1;
-  static const int OP_XLOCKACK =   -1;
-  static const int OP_UNXLOCK =     2;
-  static const int OP_AUTHPIN =     3;
-  static const int OP_AUTHPINACK = -3;
+  static constexpr int OP_XLOCK =       1;
+  static constexpr int OP_XLOCKACK =   -1;
+  static constexpr int OP_UNXLOCK =     2;
+  static constexpr int OP_AUTHPIN =     3;
+  static constexpr int OP_AUTHPINACK = -3;
 
-  static const int OP_LINKPREP =     4;
-  static const int OP_UNLINKPREP =   5;
-  static const int OP_LINKPREPACK = -4;
+  static constexpr int OP_LINKPREP =     4;
+  static constexpr int OP_UNLINKPREP =   5;
+  static constexpr int OP_LINKPREPACK = -4;
 
-  static const int OP_RENAMEPREP =     7;
-  static const int OP_RENAMEPREPACK = -7;
+  static constexpr int OP_RENAMEPREP =     7;
+  static constexpr int OP_RENAMEPREPACK = -7;
 
-  static const int OP_WRLOCK = 8;
-  static const int OP_WRLOCKACK = -8;
-  static const int OP_UNWRLOCK = 9;
+  static constexpr int OP_WRLOCK = 8;
+  static constexpr int OP_WRLOCKACK = -8;
+  static constexpr int OP_UNWRLOCK = 9;
 
-  static const int OP_RMDIRPREP = 10;
-  static const int OP_RMDIRPREPACK = -10;
+  static constexpr int OP_RMDIRPREP = 10;
+  static constexpr int OP_RMDIRPREPACK = -10;
 
-  static const int OP_DROPLOCKS        = 11;
+  static constexpr int OP_DROPLOCKS    = 11;
 
-  static const int OP_RENAMENOTIFY = 12;
-  static const int OP_RENAMENOTIFYACK = -12;
+  static constexpr int OP_RENAMENOTIFY = 12;
+  static constexpr int OP_RENAMENOTIFYACK = -12;
 
-  static const int OP_FINISH = 17;  
-  static const int OP_COMMITTED = -18;  
+  static constexpr int OP_FINISH = 17;
+  static constexpr int OP_COMMITTED = -18;
 
-  static const int OP_ABORT =  20;  // used for recovery only
-  //static const int OP_COMMIT = 21;  // used for recovery only
+  static constexpr int OP_ABORT =  20;  // used for recovery only
+  //static constexpr int OP_COMMIT = 21;  // used for recovery only
 
 
-  static const char *get_opname(int o) {
+  static constexpr char *get_opname(int o) {
     switch (o) { 
     case OP_XLOCK: return "xlock";
     case OP_XLOCKACK: return "xlock_ack";
@@ -98,12 +98,12 @@ public:
   __s16 op;
   mutable __u16 flags; /* XXX HACK for mark_interrupted */
 
-  static const unsigned FLAG_NONBLOCK  =       1<<0;
-  static const unsigned FLAG_WOULDBLOCK        =       1<<1;
-  static const unsigned FLAG_NOTJOURNALED =    1<<2;
-  static const unsigned FLAG_EROFS =           1<<3;
-  static const unsigned FLAG_ABORT =           1<<4;
-  static const unsigned FLAG_INTERRUPTED =     1<<5;
+  static constexpr unsigned FLAG_NONBLOCK       =      1<<0;
+  static constexpr unsigned FLAG_WOULDBLOCK     =      1<<1;
+  static constexpr unsigned FLAG_NOTJOURNALED   =      1<<2;
+  static constexpr unsigned FLAG_EROFS          =      1<<3;
+  static constexpr unsigned FLAG_ABORT          =      1<<4;
+  static constexpr unsigned FLAG_INTERRUPTED    =      1<<5;
 
   // for locking
   __u16 lock_type;  // lock object type
index 58905771db67cbf2a1c52db48b29ddc13e856c7c..789496131c3fa11c379329b619f6f5fac82cc530 100644 (file)
@@ -27,8 +27,8 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 8;
-  static const int COMPAT_VERSION = 8;
+  static constexpr int HEAD_VERSION = 8;
+  static constexpr int COMPAT_VERSION = 8;
 
 protected:
   uint64_t gid;
index 6d35e9ba7b7b9eb0dbd4d1026862107ca099bd2c..25c31919e6612fdd594c8e56a654518d9037f276 100644 (file)
@@ -10,8 +10,8 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   std::string daemon_name;
index 3f1ff9b00ab5588efd37a006178e6b0d636b8563..34a981ba9a93b88cf50becbcc73feac2a6406477 100644 (file)
@@ -26,8 +26,8 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   uint32_t stats_period = 0;
index 721668c4b523ba5d4389a95cd740a217223a4aed..0328f159d730b4e237b0c613c14df4890f946378 100644 (file)
@@ -22,8 +22,8 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
 
index 232e97400dedb1bc12e3f7979588cff234547360..e1f69bba4e88cd793e363a45d9620d1b572a13af 100644 (file)
@@ -75,8 +75,8 @@ public:
   friend factory;
 private:
 
-  static const int HEAD_VERSION = 6;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 6;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   /**
index 2e838b0bf7502eff078413fa7787a2b2fdcaeab7..c296bc0507c27600b8952ec5444adf9c7ae3624a 100644 (file)
@@ -25,14 +25,14 @@ public:
   friend factory;
 
 private:
-  static const int HEAD_VERSION = 7;
-  static const int COMPAT_VERSION = 5;
+  static constexpr int HEAD_VERSION = 7;
+  static constexpr int COMPAT_VERSION = 5;
 
 public:
-  static const int OP_PROPOSE = 1;
-  static const int OP_ACK     = 2;
-  static const int OP_NAK     = 3;
-  static const int OP_VICTORY = 4;
+  static constexpr int OP_PROPOSE = 1;
+  static constexpr int OP_ACK     = 2;
+  static constexpr int OP_NAK     = 3;
+  static constexpr int OP_VICTORY = 4;
   static const char *get_opname(int o) {
     switch (o) {
     case OP_PROPOSE: return "propose";
index 1eb3f567b331fd5cd77fcc07ffc7b06c406d05ff..c49b4023b28f68a2c05ed2bb8a6a4aa256745eb9 100644 (file)
@@ -28,7 +28,7 @@ class MMonGetVersionReply : public MessageInstance<MMonGetVersionReply> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
 
 public:
   MMonGetVersionReply() : MessageInstance(CEPH_MSG_MON_GET_VERSION_REPLY, HEAD_VERSION) { }
index 393bb8040468ff83185c3ea2a56ff15a5b93d00a..f076e8675f4bd85245a4b3462cc524eb62e1f977 100644 (file)
@@ -22,7 +22,7 @@ class MMonHealth : public MessageInstance<MMonHealth, MMonQuorumService> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
 
   int service_type = 0;
   int service_op = 0;
index eeb8bac23c63185e197645b14246c307e0d1519a..e69304a11cd782207f5e8d1da72ad692a522aad4 100644 (file)
@@ -11,8 +11,8 @@ class MMonHealthChecks : public MessageInstance<MMonHealthChecks, PaxosServiceMe
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   health_check_map_t health_checks;
 
index db6ffcd7db6f6a71c9f9b006f2d04b63d08bf436..aa244ff6d458d8daecd0b371e4ed3eafb29b6f48 100644 (file)
@@ -25,7 +25,7 @@ public:
   Metadata data;
 
 private:
-  static const int HEAD_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
   ~MMonMetadata() override {}
 
 public:
index 85277492a4d76da68ac3179d33670be658274286..ee6597398058906347c9b19bedf2f91260386414 100644 (file)
@@ -24,8 +24,8 @@ class MMonMgrReport : public MessageInstance<MMonMgrReport, PaxosServiceMessage>
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   // PGMapDigest is in data payload
index 56ab8c5c015930aded7ac4794a931116623be2e5..02d202dff0a30c5c9ed20a641700229f2d204213 100644 (file)
@@ -24,18 +24,18 @@ class MMonPaxos : public MessageInstance<MMonPaxos> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 3;
 
  public:
   // op types
-  const static int OP_COLLECT =   1; // proposer: propose round
-  const static int OP_LAST =      2; // voter:    accept proposed round
-  const static int OP_BEGIN =     3; // proposer: value proposed for this round
-  const static int OP_ACCEPT =    4; // voter:    accept propsed value
-  const static int OP_COMMIT =    5; // proposer: notify learners of agreed value
-  const static int OP_LEASE =     6; // leader: extend peon lease
-  const static int OP_LEASE_ACK = 7; // peon: lease ack
+  static constexpr int OP_COLLECT =   1; // proposer: propose round
+  static constexpr int OP_LAST =      2; // voter:    accept proposed round
+  static constexpr int OP_BEGIN =     3; // proposer: value proposed for this round
+  static constexpr int OP_ACCEPT =    4; // voter:    accept propsed value
+  static constexpr int OP_COMMIT =    5; // proposer: notify learners of agreed value
+  static constexpr int OP_LEASE =     6; // leader: extend peon lease
+  static constexpr int OP_LEASE_ACK = 7; // peon: lease ack
   const static char *get_opname(int op) {
     switch (op) {
     case OP_COLLECT: return "collect";
index 2ee68de71e999356ca84f93da74225b5304f36fc..e244c3a94b5873b9d081b66f83a72b4bf93ee15c 100644 (file)
@@ -24,8 +24,8 @@ class MMonProbe : public MessageInstance<MMonProbe> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 6;
-  static const int COMPAT_VERSION = 5;
+  static constexpr int HEAD_VERSION = 6;
+  static constexpr int COMPAT_VERSION = 5;
 
   enum {
     OP_PROBE = 1,
index 023fbdcd9d3709a8c52432361c7db656381c561e..cb04ac2e85e6d64d44cf6f6d2dba7ce5fb4d0b8e 100644 (file)
@@ -20,8 +20,8 @@ class MMonScrub : public MessageInstance<MMonScrub> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 2;
 
 public:
   typedef enum {
index bce11d3fc6acb522217e559796b5155e6375128c..eafcf0b055b458e7351506571d7a2b1d9833cee7 100644 (file)
@@ -33,8 +33,8 @@ class MMonSubscribe : public MessageInstance<MMonSubscribe> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 1;
 
   string hostname;
   map<string, ceph_mon_subscribe_item> what;
index c7c9d20d5e1cd8371fd3a6d59044f97e2045cfc6..0f2f34862300e1bd27b807259a46dd404f23ec8a 100644 (file)
@@ -19,8 +19,8 @@ class MMonSync : public MessageInstance<MMonSync> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 2;
 
 public:
   /**
index 73f778cebd97c3400e6db9f11091bb49140a2bdf..018eafe17810717ed2a0c67178f215ab279df1ec 100644 (file)
@@ -26,8 +26,8 @@ class MNop : public MessageInstance<MNop> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   __u32 tag; // ignored tag value
 
index a76b07a4cafb18a4d75568937adde69406d9eeec..eeaa7fefe5087925e6dcbf254198601018ec62d3 100644 (file)
@@ -24,8 +24,8 @@ class MOSDBoot : public MessageInstance<MOSDBoot, PaxosServiceMessage> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 6;
-  static const int COMPAT_VERSION = 6;
+  static constexpr int HEAD_VERSION = 6;
+  static constexpr int COMPAT_VERSION = 6;
 
  public:
   OSDSuperblock sb;
index e1cdb78e06cb316ffbc7db5dca14b14506566409..a2d63015f20d328a7012c94dcd91406a80f73211 100644 (file)
@@ -22,8 +22,8 @@ class MOSDECSubOpRead : public MessageInstance<MOSDECSubOpRead, MOSDFastDispatch
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   spg_t pgid;
index 6cdc9d60e4922a2952835254aa4f32dd4a795f07..7cc10e212f0fcbe52afb5a1e1b4ca8abe1ae8e29 100644 (file)
@@ -22,8 +22,8 @@ class MOSDECSubOpReadReply : public MessageInstance<MOSDECSubOpReadReply, MOSDFa
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   spg_t pgid;
index 7a5c382293ef96073457033899d34ca34b29e3e4..d0ed6b164689605436bd0055ee13155440ef9f38 100644 (file)
@@ -22,8 +22,8 @@ class MOSDECSubOpWrite : public MessageInstance<MOSDECSubOpWrite, MOSDFastDispat
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   spg_t pgid;
index dea3c501f8cdc7ab6c053213e24dc93c27da37cb..e066fa6c43bc40edcb51c8e5c68128ead9e17a2c 100644 (file)
@@ -22,8 +22,8 @@ class MOSDECSubOpWriteReply : public MessageInstance<MOSDECSubOpWriteReply, MOSD
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   spg_t pgid;
index 29516e06b50578032e4bf5d29c622d873996031e..0e426e5716c6c336839bb96ac996617ce6480d2e 100644 (file)
@@ -23,8 +23,8 @@ class MOSDFailure : public MessageInstance<MOSDFailure, PaxosServiceMessage> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 4;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 4;
 
  public:
   enum {
index 2a5b37f2443b7076d7974b5683c094d681273df6..eba5e5c93b29b62fac6a3685a22d6b39aec05129 100644 (file)
@@ -35,8 +35,8 @@ class MOSDForceRecovery : public MessageInstance<MOSDForceRecovery> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 2;
 
   uuid_d fsid;
   vector<spg_t> forced_pgs;
index 7ff35ba79ef10c3e31326d91ee882bf12227f093..a8822e7b3e47c0a9852c74d1d7691a9d6bb36eee 100644 (file)
@@ -24,8 +24,8 @@ class MOSDMap : public MessageInstance<MOSDMap> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 3;
 
  public:
   uuid_d fsid;
index ce773fae32dd796a316fabaa8825a4ae11e277cc..23523950e9d10e04c5334d94791ecd093ba5c23e 100644 (file)
@@ -21,8 +21,8 @@ class MOSDMarkMeDown : public MessageInstance<MOSDMarkMeDown, PaxosServiceMessag
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 3;
 
  public:
   uuid_d fsid;
index 2dd0931248bda4007f756030c8f685b654f61615..e8b1d024d257f670439525352441b1c7d9e5ce1d 100644 (file)
@@ -35,8 +35,8 @@ class MOSDOp : public MessageInstance<MOSDOp, MOSDFastDispatchOp> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 8;
-  static const int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 8;
+  static constexpr int COMPAT_VERSION = 3;
 
 private:
   uint32_t client_inc = 0;
index 21422dd2f4810134e49023775a1299d336f10148..1e5edd4b42c441f6bb4a4c184f195530d9e5db1b 100644 (file)
@@ -34,8 +34,8 @@ class MOSDOpReply : public MessageInstance<MOSDOpReply> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 8;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 8;
+  static constexpr int COMPAT_VERSION = 2;
 
   object_t oid;
   pg_t pgid;
index e57a38ccd5391316a0c394ce04c4ed0e3d954536..45e9aa9cdadbcdfe96ba6b4526716fe23796e826 100644 (file)
@@ -21,8 +21,8 @@ class MOSDPGBackfill : public MessageInstance<MOSDPGBackfill, MOSDFastDispatchOp
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 3;
 public:
   enum {
     OP_BACKFILL_PROGRESS = 2,
index 3f39f762900edd87103184f7466950fcbcd52053..d1e1e1a88e5d780da6e2f37b7ce522ac3b06d59c 100644 (file)
@@ -25,8 +25,8 @@ class MOSDPGBackfillRemove : public MessageInstance<MOSDPGBackfillRemove, MOSDFa
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   spg_t pgid;            ///< target spg_t
   epoch_t map_epoch = 0;
index c1380af5f799c146c96793ae86a0e025a21213b5..556162458cd3dc4afe87214f2a0c4a79a3505271 100644 (file)
@@ -27,8 +27,8 @@ class MOSDPGCreate : public MessageInstance<MOSDPGCreate> {
 public:
   friend factory;
 
-  const static int HEAD_VERSION = 3;
-  const static int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 3;
 
   version_t          epoch = 0;
   map<pg_t,pg_create_t> mkpg;
index 83cfc28ebe75aed26766335823786b3a7efc13d7..3dd2e2069f7cb9bdb2093bdf9b9455937a16efa9 100644 (file)
@@ -14,8 +14,8 @@ class MOSDPGCreate2 : public MessageInstance<MOSDPGCreate2> {
 public:
   friend factory;
 
-  const static int HEAD_VERSION = 1;
-  const static int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   epoch_t epoch = 0;
   map<spg_t,pair<epoch_t,utime_t>> pgs;
index 336a61d5b6bd995c6a656db24097c46b18726cc7..8434651e4b875dd4ec326818cf926dcd4e1e4331 100644 (file)
@@ -23,8 +23,8 @@ class MOSDPGInfo : public MessageInstance<MOSDPGInfo> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 5;
-  static const int COMPAT_VERSION = 5;
+  static constexpr int HEAD_VERSION = 5;
+  static constexpr int COMPAT_VERSION = 5;
 
   epoch_t epoch = 0;
 
index 4025c8f0d559223e6d7082363c73951f3304652a..86e65baeb84905732a46e6d0a480c5b0ce42cb01 100644 (file)
@@ -22,8 +22,8 @@ class MOSDPGLog : public MessageInstance<MOSDPGLog, MOSDPeeringOp> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 5;
-  static const int COMPAT_VERSION = 5;
+  static constexpr int HEAD_VERSION = 5;
+  static constexpr int COMPAT_VERSION = 5;
 
   epoch_t epoch = 0;
   /// query_epoch is the epoch of the query being responded to, or
index 5cbf6569bc91ab9576481f48daa7a71edd45df09..2447525b4cbbd9f08b12e24613b6698c6bb0e425 100644 (file)
@@ -27,8 +27,8 @@ class MOSDPGNotify : public MessageInstance<MOSDPGNotify> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 6;
-  static const int COMPAT_VERSION = 6;
+  static constexpr int HEAD_VERSION = 6;
+  static constexpr int COMPAT_VERSION = 6;
 
   epoch_t epoch = 0;
   /// query_epoch is the epoch of the query being responded to, or
index 79c13a19e64ca3e590cbf9085859ea9d7ad6366f..85043e021b069475a9282a7b063bf7e8933b0511 100644 (file)
@@ -21,8 +21,8 @@ class MOSDPGPull : public MessageInstance<MOSDPGPull, MOSDFastDispatchOp> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 2;
 
   vector<PullOp> pulls;
 
index 77864cceabafec8a89def7d29fd002a6f28d3b60..611dbd9b361c52de2f7f3364e7ceae6a95eef2b3 100644 (file)
@@ -21,8 +21,8 @@ class MOSDPGPush : public MessageInstance<MOSDPGPush, MOSDFastDispatchOp> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 2;
 
 public:
   pg_shard_t from;
index dc0d6bfb98d2478571f4f2078104ec8b701d7f41..a5c5d880e44246abd849e5ddf87f0925013ea06c 100644 (file)
@@ -21,8 +21,8 @@ class MOSDPGPushReply : public MessageInstance<MOSDPGPushReply, MOSDFastDispatch
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 2;
 
 public:
   pg_shard_t from;
index fe561ab068e1e1291272796db51ef10c4e419136..9d6eae4370950a425640de34e56e196046e6e989 100644 (file)
@@ -27,8 +27,8 @@ class MOSDPGQuery : public MessageInstance<MOSDPGQuery> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 4;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 4;
 
   version_t epoch = 0;
 
index ac4152567fad70f3cb07e6116448725f9c159075..4774978213a6da2496d3869bda04bfaf9f5fceb4 100644 (file)
@@ -14,8 +14,8 @@ class MOSDPGRecoveryDelete : public MessageInstance<MOSDPGRecoveryDelete, MOSDFa
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
   pg_shard_t from;
   spg_t pgid;            ///< target spg_t
index f48e436349cdbaae893382b842b8e75a943311aa..e2e8189b86ff5ccb40e43d8f8a82569c596c87ae 100644 (file)
@@ -10,8 +10,8 @@ class MOSDPGRecoveryDeleteReply : public MessageInstance<MOSDPGRecoveryDeleteRep
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
   pg_shard_t from;
   spg_t pgid;
index dd7b62bc4416a1bfc3b1021268b30cc8e8e90a66..7508bc0f610b9ae98ba2a74fc0ab227d1f051b54 100644 (file)
@@ -24,8 +24,8 @@ class MOSDPGRemove : public MessageInstance<MOSDPGRemove> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 3;
 
   epoch_t epoch = 0;
 
index 4da8aac5128bb15700a7ea03170cf2c11d681a1b..04db4ae61659751217d032018b58fe0a66b2ccdf 100644 (file)
@@ -21,8 +21,8 @@ class MOSDPGScan : public MessageInstance<MOSDPGScan, MOSDFastDispatchOp> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 2;
 
 public:
   enum {
index ce8312dcaeed9349a0ba90add7ba55b8a6b2afec..2ec971d4dedb7efa7cd30b4ddd123455cb5d5c6c 100644 (file)
@@ -22,8 +22,8 @@ class MOSDPGTrim : public MessageInstance<MOSDPGTrim, MOSDPeeringOp> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 2;
 
 public:
   epoch_t epoch = 0;
index 1764c23f1b555086d9930b4bf05f66d54a78ae99..f3db4bf935b9c4a36c3b0f9d07324405ab4395dc 100644 (file)
@@ -22,8 +22,8 @@ class MOSDPGUpdateLogMissing : public MessageInstance<MOSDPGUpdateLogMissing, MO
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 1;
 
 
 public:
index 9a7df150ee83f3448e8769dabfb7e218504734bb..3f70eded1aff215163a3125f45a983f5044dbff9 100644 (file)
@@ -22,8 +22,8 @@ class MOSDPGUpdateLogMissingReply : public MessageInstance<MOSDPGUpdateLogMissin
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 1;
 
 
 public:
index 1728cf8e565a9acee28df7bb2bc6ad78ac7c8c3e..16c6e3d6f013bb9a82809c612c01654adee8d89d 100644 (file)
@@ -36,8 +36,8 @@ class MOSDPing : public MessageInstance<MOSDPing> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 4;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 4;
 
  public:
   enum {
index daacad60406f2eb48d04eac577ac9992a94c228e..fc6d06c1f7583e18f784090e84d9b951d586d347 100644 (file)
@@ -26,8 +26,8 @@ class MOSDRepOp : public MessageInstance<MOSDRepOp, MOSDFastDispatchOp> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   epoch_t map_epoch, min_epoch;
index 239864846586aa720ddce480da25c0d4ec2afb84..8f158bce0abd988f858aa2f69a7a40d29e3dc831 100644 (file)
@@ -32,8 +32,8 @@ class MOSDRepOpReply : public MessageInstance<MOSDRepOpReply, MOSDFastDispatchOp
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 public:
   epoch_t map_epoch, min_epoch;
 
index 69714ccc4f2e76b41cadc4b798e77f469bec2973..953c1a377bbcebb63d3725fd7c29287c20aded99 100644 (file)
@@ -26,8 +26,8 @@ class MOSDRepScrub : public MessageInstance<MOSDRepScrub, MOSDFastDispatchOp> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 9;
-  static const int COMPAT_VERSION = 6;
+  static constexpr int HEAD_VERSION = 9;
+  static constexpr int COMPAT_VERSION = 6;
 
   spg_t pgid;             // PG to scrub
   eversion_t scrub_from; // only scrub log entries after scrub_from
index 96705d0f51daf85cff5f5903f39ecbc3e3527fb6..45a736cbff5466e9dc5bc3a804424bcf45e68633 100644 (file)
@@ -25,8 +25,8 @@ class MOSDRepScrubMap : public MessageInstance<MOSDRepScrubMap, MOSDFastDispatch
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
   spg_t pgid;            // primary spg_t
   epoch_t map_epoch = 0;
index f46ff17475611a6a9392a1555a3f9b343811da4b..71b9749d6103800740bf0353a886bc333feaf9d6 100644 (file)
@@ -26,8 +26,8 @@ class MOSDScrub : public MessageInstance<MOSDScrub> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 2;
 
   uuid_d fsid;
   vector<pg_t> scrub_pgs;
index 28e1d2a3bf32e40709ff22735ca9ec1c4a95969a..6e1a6145f77e4c2759a3c8a94262e300096b769c 100644 (file)
@@ -13,8 +13,8 @@ class MOSDScrub2 : public MessageInstance<MOSDScrub2> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   uuid_d fsid;
   epoch_t epoch;
index 5cab78d59d24dbe015bcd28334c55e74591f1bbd..c8966c1a6ce9dfa216c7cf6d6456b16b1e2d544a 100644 (file)
@@ -21,8 +21,8 @@ class MOSDScrubReserve : public MessageInstance<MOSDScrubReserve, MOSDFastDispat
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 public:
   spg_t pgid;
   epoch_t map_epoch;
index 8a6ba7d8e3901ac4c0bbb30f579fdb7bc9631e16..e18ef55da5759ac3697f922e293babc7d64881f1 100644 (file)
@@ -22,8 +22,8 @@ class MPoolOp : public MessageInstance<MPoolOp, PaxosServiceMessage> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 4;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 4;
+  static constexpr int COMPAT_VERSION = 2;
 
 public:
   uuid_d fsid;
index 344eae5516b35c859a4ff2c0a65fa791d73892e6..ae10f36349570e06749c59f93a1340f4d52c19c8 100644 (file)
@@ -22,8 +22,8 @@ class MRecoveryReserve : public MessageInstance<MRecoveryReserve, MOSDPeeringOp>
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 2;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 2;
 public:
   spg_t pgid;
   epoch_t query_epoch;
index b858abe414bbd10371854c9e6f98697302696a8d..1e35a0b2bca4652f7a5e0d0142c97f34746d4b96 100644 (file)
@@ -24,8 +24,8 @@ class MRoute : public MessageInstance<MRoute> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 3;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 3;
 
   uint64_t session_mon_tid;
   Message *msg;
index 71f2d7fea555217a72e02faf2da085a0db4ee555..45601d78d330b73d0dc93c16978bbb2ed9961625 100644 (file)
@@ -23,8 +23,8 @@ class MStatfs : public MessageInstance<MStatfs, PaxosServiceMessage> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 2;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 2;
+  static constexpr int COMPAT_VERSION = 1;
 
 public:
   uuid_d fsid;
index 5905c6b6a7574005ffa9803196c6c6792bd0c2d9..628640a753421892854f54a3c2fafa3652648da6 100644 (file)
@@ -19,7 +19,7 @@ class MTimeCheck : public MessageInstance<MTimeCheck> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
 
   enum {
     OP_PING = 1,
index 56243d10a92e96aba5445f15db26fcdda77510f1..6c100c672b0f4fc4ef79591b608139f324751003 100644 (file)
@@ -18,8 +18,8 @@ class MTimeCheck2 : public MessageInstance<MTimeCheck2> {
 public:
   friend factory;
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   enum {
     OP_PING = 1,
index 1300ba6d92e71e905f8981f56ef7a5c5ed646036..8da4738b35a11fe63084c8274b61be6c90d5ea8f 100644 (file)
@@ -23,8 +23,8 @@ class MWatchNotify : public MessageInstance<MWatchNotify> {
 public:
   friend factory;
 private:
-  static const int HEAD_VERSION = 3;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 3;
+  static constexpr int COMPAT_VERSION = 1;
 
  public:
   uint64_t cookie;     ///< client unique id for this watch or notify
index 841353019d82bb61467fd124e83db88b1eadc5ee..095e1874cdae16baccdcaada9651e63d9d09e3fd 100644 (file)
@@ -318,8 +318,8 @@ inline const char *ceph_mon_feature_name(uint64_t b)
 
 class mon_feature_t {
 
-  static const int HEAD_VERSION = 1;
-  static const int COMPAT_VERSION = 1;
+  static constexpr int HEAD_VERSION = 1;
+  static constexpr int COMPAT_VERSION = 1;
 
   // mon-specific features
   uint64_t features;