vector<pair<pg_notify_t,pg_interval_map_t> > pg_list; // pgid -> version
public:
- version_t get_epoch() { return epoch; }
- vector<pair<pg_notify_t,pg_interval_map_t> >& get_pg_list() { return pg_list; }
+ version_t get_epoch() const { return epoch; }
+ const vector<pair<pg_notify_t,pg_interval_map_t> >& get_pg_list() const {
+ return pg_list;
+ }
MOSDPGNotify()
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION) {
- set_priority(CEPH_MSG_PRIO_HIGH);
+ set_priority(CEPH_MSG_PRIO_HIGH);
}
MOSDPGNotify(epoch_t e, vector<pair<pg_notify_t,pg_interval_map_t> >& l)
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION),
*/
void OSD::handle_pg_notify(OpRequestRef op)
{
- MOSDPGNotify *m = (MOSDPGNotify*)op->get_req();
+ const MOSDPGNotify *m = static_cast<const MOSDPGNotify*>(op->get_req());
assert(m->get_type() == MSG_OSD_PG_NOTIFY);
dout(7) << "handle_pg_notify from " << m->get_source() << dendl;
op->mark_started();
- for (vector<pair<pg_notify_t, pg_interval_map_t> >::iterator it = m->get_pg_list().begin();
+ for (auto it = m->get_pg_list().begin();
it != m->get_pg_list().end();
++it) {
-
if (it->first.info.pgid.preferred() >= 0) {
dout(20) << "ignoring localized pg " << it->first.info.pgid << dendl;
continue;