bool is_immediate() const {
return flags & FLAG_IMMEDIATE;
}
- epoch_t get_epoch() { return epoch; }
+ epoch_t get_epoch() const { return epoch; }
void decode_payload() {
bufferlist::iterator p = payload.begin();
~MOSDMarkMeDown() {}
public:
- entity_inst_t get_target() { return target_osd; }
- epoch_t get_epoch() { return epoch; }
+ entity_inst_t get_target() const { return target_osd; }
+ epoch_t get_epoch() const { return epoch; }
void decode_payload() {
bufferlist::iterator p = payload.begin();
else
return object_locator_t(hobj);
}
- object_t& get_oid() {
+ const object_t& get_oid() const {
assert(!final_decode_needed);
return hobj.oid;
}
const hobject_t &get_hobj() const {
return hobj;
}
- snapid_t get_snapid() {
+ snapid_t get_snapid() const {
assert(!final_decode_needed);
return hobj.snap;
}
add_simple_op(CEPH_OSD_OP_STAT, 0, 0);
}
- bool has_flag(__u32 flag) { return flags & flag; };
+ bool has_flag(__u32 flag) const { return flags & flag; };
bool wants_ack() const { return flags & CEPH_OSD_FLAG_ACK; }
bool wants_ondisk() const { return flags & CEPH_OSD_FLAG_ONDISK; }
bool wants_onnvram() const { return flags & CEPH_OSD_FLAG_ONNVRAM; }
: Message(CEPH_MSG_OSD_OPREPLY, HEAD_VERSION, COMPAT_VERSION) {
do_redirect = false;
}
- MOSDOpReply(MOSDOp *req, int r, epoch_t e, int acktype, bool ignore_out_data)
+ MOSDOpReply(const MOSDOp *req, int r, epoch_t e, int acktype,
+ bool ignore_out_data)
: Message(CEPH_MSG_OSD_OPREPLY, HEAD_VERSION, COMPAT_VERSION),
oid(req->hobj.oid), pgid(req->pgid.pgid), ops(req->ops) {
spg_t pgid;
eversion_t trim_to;
- epoch_t get_epoch() { return epoch; }
+ epoch_t get_epoch() const { return epoch; }
MOSDPGTrim() : Message(MSG_OSD_PG_TRIM, HEAD_VERSION, COMPAT_VERSION) {}
MOSDPGTrim(version_t mv, spg_t p, eversion_t tt) :
int get_result() { return result; }
void set_last_complete_ondisk(eversion_t v) { last_complete_ondisk = v; }
- eversion_t get_last_complete_ondisk() { return last_complete_ondisk; }
+ eversion_t get_last_complete_ondisk() const { return last_complete_ondisk; }
public:
MOSDRepOpReply(
- MOSDRepOp *req, pg_shard_t from, int result_, epoch_t e, int at) :
+ const MOSDRepOp *req, pg_shard_t from, int result_, epoch_t e, int at) :
MOSDFastDispatchOp(MSG_OSD_REPOPREPLY, HEAD_VERSION, COMPAT_VERSION),
map_epoch(e),
reqid(req->reqid),
epoch_t get_map_epoch() { return map_epoch; }
- spg_t get_pg() { return pgid; }
- hobject_t get_poid() { return poid; }
+ spg_t get_pg() const { return pgid; }
+ const hobject_t& get_poid() const { return poid; }
int get_ack_type() { return ack_type; }
bool is_ondisk() { return ack_type & CEPH_OSD_FLAG_ONDISK; }
public:
MOSDSubOpReply(
- MOSDSubOp *req, pg_shard_t from, int result_, epoch_t e, int at)
+ const MOSDSubOp *req, pg_shard_t from, int result_, epoch_t e, int at)
: MOSDFastDispatchOp(MSG_OSD_SUBOPREPLY, HEAD_VERSION, COMPAT_VERSION),
map_epoch(e),
reqid(req->reqid),