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>
int get_from() { return from; }
- MCacheExpire() {}
+ MCacheExpire() : Message(MSG_MDS_CACHEEXPIRE) {}
MCacheExpire(int f) :
Message(MSG_MDS_CACHEEXPIRE),
from(f) { }
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,
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));
if (discover) discover--;
}
- MDirUpdate() {}
+ MDirUpdate() : Message(MSG_MDS_DIRUPDATE) {}
MDirUpdate(int f,
dirfrag_t dirfrag,
int dir_rep,
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,
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()),
vector<dirfrag_t> bounds;
bufferlist client_map;
- MExportDir() {}
+ MExportDir() : Message(MSG_MDS_EXPORTDIR) {}
MExportDir(dirfrag_t df) :
Message(MSG_MDS_EXPORTDIR),
dirfrag(df) {
public:
dirfrag_t get_dirfrag() { return dirfrag; }
- MExportDirAck() {}
+ MExportDirAck() : Message(MSG_MDS_EXPORTDIRACK) {}
MExportDirAck(dirfrag_t i) :
Message(MSG_MDS_EXPORTDIRACK), dirfrag(i) { }
private:
public:
dirfrag_t get_dirfrag() { return dirfrag; }
- MExportDirCancel() {}
+ MExportDirCancel() : Message(MSG_MDS_EXPORTDIRCANCEL) {}
MExportDirCancel(dirfrag_t df) :
Message(MSG_MDS_EXPORTDIRCANCEL),
dirfrag(df) { }
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),
}
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:
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;
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),
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) { }
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) {
rmw_flags(flags) {
set_tid(tid);
}
- MOSDOp() : rmw_flags(0) {}
+ MOSDOp() : Message(CEPH_MSG_OSD_OP) {}
private:
~MOSDOp() {}
for (unsigned i = 0; i < ops.size(); i++)
ops[i].op.payload_len = 0;
}
- MOSDOpReply() {}
+ MOSDOpReply() : Message(CEPH_MSG_OSD_OPREPLY) {}
private:
~MOSDOpReply() {}
map<pg_t,create_rec> mkpg;
- MOSDPGCreate() {}
+ MOSDPGCreate() : Message(MSG_OSD_PG_CREATE) {}
MOSDPGCreate(epoch_t e) :
Message(MSG_OSD_PG_CREATE),
epoch(e) { }
epoch_t get_epoch() { return epoch; }
- MOSDPGInfo() {}
+ MOSDPGInfo() : Message(MSG_OSD_PG_INFO) {}
MOSDPGInfo(version_t mv) :
Message(MSG_OSD_PG_INFO),
epoch(mv) { }
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) { }
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_),
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) {
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) {
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;
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) { }
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() {}
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),
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) {}
memset(&peer_stat, 0, sizeof(peer_stat));
set_tid(rtid);
}
- MOSDSubOp() {}
+ MOSDSubOp() : Message(MSG_OSD_SUBOP) {}
private:
~MOSDSubOp() {}
memset(&peer_stat, 0, sizeof(peer_stat));
set_tid(req->get_tid());
}
- MOSDSubOpReply() {}
+ MOSDSubOpReply() : Message(MSG_OSD_SUBOPREPLY) {}
private:
~MOSDSubOpReply() {}