diff options
author | Sage Weil <sage.weil@dreamhost.com> | 2012-02-02 21:03:08 -0800 |
---|---|---|
committer | Sage Weil <sage.weil@dreamhost.com> | 2012-02-02 21:06:33 -0800 |
commit | 5103338ceea0ca60d122d6b9cede211ace1dd49e (patch) | |
tree | 9e4db99f7ba9fb379b9ad95256d4985c1ebd836c /src/messages | |
parent | ae67c2deb11f41e2be2f7bbd42d93386063ad9cb (diff) | |
download | ceph-5103338ceea0ca60d122d6b9cede211ace1dd49e.tar.gz |
messages: set type in default constructor
ceph-dencoder wants this to verify it decoded the correct message type.
Not that it is likely to happen, but let's be pendantic about it anyway.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'src/messages')
30 files changed, 33 insertions, 36 deletions
diff --git a/src/messages/MCacheExpire.h b/src/messages/MCacheExpire.h index 3e1b0e6ab49..717998d0b97 100644 --- a/src/messages/MCacheExpire.h +++ b/src/messages/MCacheExpire.h @@ -47,7 +47,7 @@ public: int get_from() { return from; } - MCacheExpire() {} + MCacheExpire() : Message(MSG_MDS_CACHEEXPIRE) {} MCacheExpire(int f) : Message(MSG_MDS_CACHEEXPIRE), from(f) { } diff --git a/src/messages/MClientCaps.h b/src/messages/MClientCaps.h index d515304f93e..f68e0336186 100644 --- a/src/messages/MClientCaps.h +++ b/src/messages/MClientCaps.h @@ -69,7 +69,7 @@ class MClientCaps : public Message { void set_mtime(const utime_t &t) { t.encode_timeval(&head.mtime); } void set_atime(const utime_t &t) { t.encode_timeval(&head.atime); } - MClientCaps() {} + MClientCaps() : Message(CEPH_MSG_CLIENT_CAPS) {} MClientCaps(int op, inodeno_t ino, inodeno_t realm, diff --git a/src/messages/MClientReply.h b/src/messages/MClientReply.h index ee3dbb92a4f..a2803ef9ded 100644 --- a/src/messages/MClientReply.h +++ b/src/messages/MClientReply.h @@ -199,7 +199,7 @@ public: bool is_safe() const { return head.safe; } - MClientReply() {} + MClientReply() : Message(CEPH_MSG_CLIENT_REPLY) {} MClientReply(MClientRequest *req, int result = 0) : Message(CEPH_MSG_CLIENT_REPLY) { memset(&head, 0, sizeof(head)); diff --git a/src/messages/MDirUpdate.h b/src/messages/MDirUpdate.h index e9914c235c7..445cd828cfe 100644 --- a/src/messages/MDirUpdate.h +++ b/src/messages/MDirUpdate.h @@ -38,7 +38,7 @@ class MDirUpdate : public Message { if (discover) discover--; } - MDirUpdate() {} + MDirUpdate() : Message(MSG_MDS_DIRUPDATE) {} MDirUpdate(int f, dirfrag_t dirfrag, int dir_rep, diff --git a/src/messages/MDiscover.h b/src/messages/MDiscover.h index 937b51ec92f..296825ccc8b 100644 --- a/src/messages/MDiscover.h +++ b/src/messages/MDiscover.h @@ -49,7 +49,7 @@ class MDiscover : public Message { void set_base_dir_frag(frag_t f) { base_dir_frag = f; } - MDiscover() { } + MDiscover() : Message(MSG_MDS_DISCOVER) { } MDiscover(inodeno_t base_ino_, frag_t base_frag_, snapid_t s, diff --git a/src/messages/MDiscoverReply.h b/src/messages/MDiscoverReply.h index 7a41be1e3f6..bad3386c3ef 100644 --- a/src/messages/MDiscoverReply.h +++ b/src/messages/MDiscoverReply.h @@ -112,7 +112,7 @@ class MDiscoverReply : public Message { void set_base_dir_frag(frag_t df) { base_dir_frag = df; } // cons - MDiscoverReply() {} + MDiscoverReply() : Message(MSG_MDS_DISCOVERREPLY) {} MDiscoverReply(MDiscover *dis) : Message(MSG_MDS_DISCOVERREPLY), base_ino(dis->get_base_ino()), diff --git a/src/messages/MExportDir.h b/src/messages/MExportDir.h index 4f74e7a926e..688526d8dcd 100644 --- a/src/messages/MExportDir.h +++ b/src/messages/MExportDir.h @@ -26,7 +26,7 @@ class MExportDir : public Message { vector<dirfrag_t> bounds; bufferlist client_map; - MExportDir() {} + MExportDir() : Message(MSG_MDS_EXPORTDIR) {} MExportDir(dirfrag_t df) : Message(MSG_MDS_EXPORTDIR), dirfrag(df) { diff --git a/src/messages/MExportDirAck.h b/src/messages/MExportDirAck.h index 8ad79d9f961..42c5c5d48ce 100644 --- a/src/messages/MExportDirAck.h +++ b/src/messages/MExportDirAck.h @@ -23,7 +23,7 @@ class MExportDirAck : public Message { public: dirfrag_t get_dirfrag() { return dirfrag; } - MExportDirAck() {} + MExportDirAck() : Message(MSG_MDS_EXPORTDIRACK) {} MExportDirAck(dirfrag_t i) : Message(MSG_MDS_EXPORTDIRACK), dirfrag(i) { } private: diff --git a/src/messages/MExportDirCancel.h b/src/messages/MExportDirCancel.h index 52f7b124fa9..9cd06021bd4 100644 --- a/src/messages/MExportDirCancel.h +++ b/src/messages/MExportDirCancel.h @@ -24,7 +24,7 @@ class MExportDirCancel : public Message { public: dirfrag_t get_dirfrag() { return dirfrag; } - MExportDirCancel() {} + MExportDirCancel() : Message(MSG_MDS_EXPORTDIRCANCEL) {} MExportDirCancel(dirfrag_t df) : Message(MSG_MDS_EXPORTDIRCANCEL), dirfrag(df) { } diff --git a/src/messages/MExportDirDiscoverAck.h b/src/messages/MExportDirDiscoverAck.h index 2aafc7400b8..82eeb5ea82c 100644 --- a/src/messages/MExportDirDiscoverAck.h +++ b/src/messages/MExportDirDiscoverAck.h @@ -27,7 +27,7 @@ class MExportDirDiscoverAck : public Message { dirfrag_t get_dirfrag() { return dirfrag; } bool is_success() { return success; } - MExportDirDiscoverAck() {} + MExportDirDiscoverAck() : Message(MSG_MDS_EXPORTDIRDISCOVERACK) {} MExportDirDiscoverAck(dirfrag_t df, bool s=true) : Message(MSG_MDS_EXPORTDIRDISCOVERACK), dirfrag(df), diff --git a/src/messages/MHeartbeat.h b/src/messages/MHeartbeat.h index bddffc0b001..b6cfcfaf010 100644 --- a/src/messages/MHeartbeat.h +++ b/src/messages/MHeartbeat.h @@ -33,13 +33,10 @@ class MHeartbeat : public Message { } MHeartbeat() - : load(utime_t()) - { - } - MHeartbeat(mds_load_t& load, int beat) : - Message(MSG_MDS_HEARTBEAT), - load(load) - { + : Message(MSG_MDS_HEARTBEAT), load(utime_t()) { } + MHeartbeat(mds_load_t& load, int beat) + : Message(MSG_MDS_HEARTBEAT), + load(load) { this->beat = beat; } private: diff --git a/src/messages/MInodeFileCaps.h b/src/messages/MInodeFileCaps.h index b5fc0ddd346..bc4db2fc60a 100644 --- a/src/messages/MInodeFileCaps.h +++ b/src/messages/MInodeFileCaps.h @@ -24,7 +24,7 @@ class MInodeFileCaps : public Message { inodeno_t get_ino() { return ino; } int get_caps() { return caps; } - MInodeFileCaps() {} + MInodeFileCaps() : Message(MSG_MDS_INODEFILECAPS) {} MInodeFileCaps(inodeno_t ino, int caps) : Message(MSG_MDS_INODEFILECAPS) { this->ino = ino; diff --git a/src/messages/MLock.h b/src/messages/MLock.h index 66cbe212f38..5dd4a858be6 100644 --- a/src/messages/MLock.h +++ b/src/messages/MLock.h @@ -39,7 +39,7 @@ public: int get_lock_type() { return lock_type; } MDSCacheObjectInfo &get_object_info() { return object_info; } - MLock() {} + MLock() : Message(MSG_MDS_LOCK) {} MLock(int ac, int as) : Message(MSG_MDS_LOCK), action(ac), asker(as), diff --git a/src/messages/MMDSFragmentNotify.h b/src/messages/MMDSFragmentNotify.h index 10eb0c7d402..2d86b57acc1 100644 --- a/src/messages/MMDSFragmentNotify.h +++ b/src/messages/MMDSFragmentNotify.h @@ -31,7 +31,7 @@ class MMDSFragmentNotify : public Message { bufferlist basebl; - MMDSFragmentNotify() {} + MMDSFragmentNotify() : Message(MSG_MDS_FRAGMENTNOTIFY) {} MMDSFragmentNotify(inodeno_t i, frag_t bf, int b) : Message(MSG_MDS_FRAGMENTNOTIFY), ino(i), basefrag(bf), bits(b) { } diff --git a/src/messages/MMDSTableRequest.h b/src/messages/MMDSTableRequest.h index fcbfcb8638e..e67c1f3ef2d 100644 --- a/src/messages/MMDSTableRequest.h +++ b/src/messages/MMDSTableRequest.h @@ -26,7 +26,7 @@ class MMDSTableRequest : public Message { uint64_t reqid; bufferlist bl; - MMDSTableRequest() {} + MMDSTableRequest() : Message(MSG_MDS_TABLE_REQUEST) {} MMDSTableRequest(int tab, int o, uint64_t r, version_t v=0) : Message(MSG_MDS_TABLE_REQUEST), table(tab), op(o), reqid(r) { diff --git a/src/messages/MOSDOp.h b/src/messages/MOSDOp.h index 1bca186f1ac..b77d8550045 100644 --- a/src/messages/MOSDOp.h +++ b/src/messages/MOSDOp.h @@ -114,7 +114,7 @@ public: rmw_flags(flags) { set_tid(tid); } - MOSDOp() : rmw_flags(0) {} + MOSDOp() : Message(CEPH_MSG_OSD_OP) {} private: ~MOSDOp() {} diff --git a/src/messages/MOSDOpReply.h b/src/messages/MOSDOpReply.h index c60f834b69b..8fe58a08e70 100644 --- a/src/messages/MOSDOpReply.h +++ b/src/messages/MOSDOpReply.h @@ -103,7 +103,7 @@ public: for (unsigned i = 0; i < ops.size(); i++) ops[i].op.payload_len = 0; } - MOSDOpReply() {} + MOSDOpReply() : Message(CEPH_MSG_OSD_OPREPLY) {} private: ~MOSDOpReply() {} diff --git a/src/messages/MOSDPGCreate.h b/src/messages/MOSDPGCreate.h index 0efcb0145af..d9537363df8 100644 --- a/src/messages/MOSDPGCreate.h +++ b/src/messages/MOSDPGCreate.h @@ -44,7 +44,7 @@ struct MOSDPGCreate : public Message { map<pg_t,create_rec> mkpg; - MOSDPGCreate() {} + MOSDPGCreate() : Message(MSG_OSD_PG_CREATE) {} MOSDPGCreate(epoch_t e) : Message(MSG_OSD_PG_CREATE), epoch(e) { } diff --git a/src/messages/MOSDPGInfo.h b/src/messages/MOSDPGInfo.h index 2dc6ebb9961..a79a6e66c7a 100644 --- a/src/messages/MOSDPGInfo.h +++ b/src/messages/MOSDPGInfo.h @@ -27,7 +27,7 @@ public: epoch_t get_epoch() { return epoch; } - MOSDPGInfo() {} + MOSDPGInfo() : Message(MSG_OSD_PG_INFO) {} MOSDPGInfo(version_t mv) : Message(MSG_OSD_PG_INFO), epoch(mv) { } diff --git a/src/messages/MOSDPGLog.h b/src/messages/MOSDPGLog.h index 41aca565c53..3b925bedc58 100644 --- a/src/messages/MOSDPGLog.h +++ b/src/messages/MOSDPGLog.h @@ -35,7 +35,7 @@ public: pg_t get_pgid() { return info.pgid; } epoch_t get_query_epoch() { return query_epoch; } - MOSDPGLog() {} + MOSDPGLog() : Message(MSG_OSD_PG_LOG) {} MOSDPGLog(version_t mv, pg_info_t& i) : Message(MSG_OSD_PG_LOG), epoch(mv), query_epoch(mv), info(i) { } diff --git a/src/messages/MOSDPGMissing.h b/src/messages/MOSDPGMissing.h index 20f61a4c720..024414b3791 100644 --- a/src/messages/MOSDPGMissing.h +++ b/src/messages/MOSDPGMissing.h @@ -27,7 +27,7 @@ public: epoch_t get_epoch() { return epoch; } - MOSDPGMissing() {} + MOSDPGMissing() : Message(MSG_OSD_PG_MISSING) {} MOSDPGMissing(version_t mv, const pg_info_t &info_, const pg_missing_t &missing_) : Message(MSG_OSD_PG_MISSING), epoch(mv), info(info_), diff --git a/src/messages/MOSDPGNotify.h b/src/messages/MOSDPGNotify.h index 9c5306ff9c8..88a091729d7 100644 --- a/src/messages/MOSDPGNotify.h +++ b/src/messages/MOSDPGNotify.h @@ -37,7 +37,7 @@ class MOSDPGNotify : public Message { vector<pg_info_t>& get_pg_list() { return pg_list; } epoch_t get_query_epoch() { return query_epoch; } - MOSDPGNotify() {} + MOSDPGNotify() : Message(MSG_OSD_PG_NOTIFY) {} MOSDPGNotify(epoch_t e, vector<pg_info_t>& l, epoch_t query_epoch) : Message(MSG_OSD_PG_NOTIFY), epoch(e), query_epoch(query_epoch) { diff --git a/src/messages/MOSDPGQuery.h b/src/messages/MOSDPGQuery.h index 358f4390726..0416673383e 100644 --- a/src/messages/MOSDPGQuery.h +++ b/src/messages/MOSDPGQuery.h @@ -29,7 +29,7 @@ class MOSDPGQuery : public Message { version_t get_epoch() { return epoch; } map<pg_t,pg_query_t> pg_list; - MOSDPGQuery() {} + MOSDPGQuery() : Message(MSG_OSD_PG_QUERY) {} MOSDPGQuery(epoch_t e, map<pg_t,pg_query_t>& ls) : Message(MSG_OSD_PG_QUERY), epoch(e) { diff --git a/src/messages/MOSDPGRemove.h b/src/messages/MOSDPGRemove.h index bc8a343db0d..c6ec797466e 100644 --- a/src/messages/MOSDPGRemove.h +++ b/src/messages/MOSDPGRemove.h @@ -27,7 +27,7 @@ class MOSDPGRemove : public Message { epoch_t get_epoch() { return epoch; } - MOSDPGRemove() {} + MOSDPGRemove() : Message(MSG_OSD_PG_REMOVE) {} MOSDPGRemove(epoch_t e, vector<pg_t>& l) : Message(MSG_OSD_PG_REMOVE) { this->epoch = e; diff --git a/src/messages/MOSDPGTrim.h b/src/messages/MOSDPGTrim.h index ad1efa3ac59..ad52a7f5fe7 100644 --- a/src/messages/MOSDPGTrim.h +++ b/src/messages/MOSDPGTrim.h @@ -25,7 +25,7 @@ public: epoch_t get_epoch() { return epoch; } - MOSDPGTrim() {} + MOSDPGTrim() : Message(MSG_OSD_PG_TRIM) {} MOSDPGTrim(version_t mv, pg_t p, eversion_t tt) : Message(MSG_OSD_PG_TRIM), epoch(mv), pgid(p), trim_to(tt) { } diff --git a/src/messages/MOSDPing.h b/src/messages/MOSDPing.h index 9956ef25ad9..6c3d7e8b387 100644 --- a/src/messages/MOSDPing.h +++ b/src/messages/MOSDPing.h @@ -48,7 +48,7 @@ class MOSDPing : public Message { Message(MSG_OSD_PING), fsid(f), map_epoch(e), peer_as_of_epoch(pe), op(o) { } MOSDPing(const uuid_d& f, epoch_t e, epoch_t pe, osd_peer_stat_t& ps, __u8 o=HEARTBEAT) : Message(MSG_OSD_PING), fsid(f), map_epoch(e), peer_as_of_epoch(pe), op(o), peer_stat(ps) { } - MOSDPing() {} + MOSDPing() : Message(MSG_OSD_PING) {} private: ~MOSDPing() {} diff --git a/src/messages/MOSDRepScrub.h b/src/messages/MOSDRepScrub.h index 522bfb22b21..3a32ba21458 100644 --- a/src/messages/MOSDRepScrub.h +++ b/src/messages/MOSDRepScrub.h @@ -28,7 +28,7 @@ struct MOSDRepScrub : public Message { eversion_t scrub_to; // last_update_applied when message sent epoch_t map_epoch; - MOSDRepScrub() {} + MOSDRepScrub() : Message(MSG_OSD_REP_SCRUB) {} MOSDRepScrub(pg_t pgid, eversion_t scrub_from, eversion_t scrub_to, epoch_t map_epoch) : Message(MSG_OSD_REP_SCRUB), diff --git a/src/messages/MOSDScrub.h b/src/messages/MOSDScrub.h index 67633e82d14..e4c9bd15868 100644 --- a/src/messages/MOSDScrub.h +++ b/src/messages/MOSDScrub.h @@ -27,7 +27,7 @@ struct MOSDScrub : public Message { vector<pg_t> scrub_pgs; bool repair; - MOSDScrub() {} + MOSDScrub() : Message(MSG_OSD_SCRUB) {} MOSDScrub(const uuid_d& f, bool r) : Message(MSG_OSD_SCRUB), fsid(f), repair(r) {} diff --git a/src/messages/MOSDSubOp.h b/src/messages/MOSDSubOp.h index 81aba7f3366..bee6a97e592 100644 --- a/src/messages/MOSDSubOp.h +++ b/src/messages/MOSDSubOp.h @@ -165,7 +165,7 @@ public: memset(&peer_stat, 0, sizeof(peer_stat)); set_tid(rtid); } - MOSDSubOp() {} + MOSDSubOp() : Message(MSG_OSD_SUBOP) {} private: ~MOSDSubOp() {} diff --git a/src/messages/MOSDSubOpReply.h b/src/messages/MOSDSubOpReply.h index aa186372bbb..fc2d7717eab 100644 --- a/src/messages/MOSDSubOpReply.h +++ b/src/messages/MOSDSubOpReply.h @@ -119,7 +119,7 @@ public: memset(&peer_stat, 0, sizeof(peer_stat)); set_tid(req->get_tid()); } - MOSDSubOpReply() {} + MOSDSubOpReply() : Message(MSG_OSD_SUBOPREPLY) {} private: ~MOSDSubOpReply() {} |