public:
version_t get_epoch() const { return epoch; }
- map<spg_t, pg_query_t> pg_list;
+ using pg_list_t = std::map<spg_t, pg_query_t>;
+ pg_list_t pg_list;
MOSDPGQuery() : MessageInstance(MSG_OSD_PG_QUERY,
HEAD_VERSION,
COMPAT_VERSION) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
- MOSDPGQuery(epoch_t e, map<spg_t,pg_query_t>& ls) :
+ MOSDPGQuery(epoch_t e, pg_list_t&& ls) :
MessageInstance(MSG_OSD_PG_QUERY,
HEAD_VERSION,
COMPAT_VERSION),
- epoch(e) {
- pg_list.swap(ls);
+ epoch(e),
+ pg_list(std::move(ls)) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
private:
service.share_map_peer(who, con.get(), curmap);
dout(7) << __func__ << " querying osd." << who
<< " on " << pit->second.size() << " PGs" << dendl;
- MOSDPGQuery *m = new MOSDPGQuery(curmap->get_epoch(), pit->second);
+ MOSDPGQuery *m = new MOSDPGQuery(curmap->get_epoch(),
+ std::move(pit->second));
con->send_message(m);
}
}