Signed-off-by: Sage Weil <sage@redhat.com>
public:
vector<spg_t> pg_list;
- epoch_t get_epoch() { return epoch; }
+ epoch_t get_epoch() const { return epoch; }
MOSDPGRemove() :
Message(MSG_OSD_PG_REMOVE, HEAD_VERSION, COMPAT_VERSION) {}
void OSD::handle_pg_remove(OpRequestRef op)
{
- MOSDPGRemove *m = (MOSDPGRemove *)op->get_req();
+ const MOSDPGRemove *m = static_cast<const MOSDPGRemove *>(op->get_req());
assert(m->get_type() == MSG_OSD_PG_REMOVE);
assert(osd_lock.is_locked());
op->mark_started();
- for (vector<spg_t>::iterator it = m->pg_list.begin();
+ for (auto it = m->pg_list.begin();
it != m->pg_list.end();
++it) {
spg_t pgid = *it;