mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
osd: constify handle_pg_notify
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
854eee20e8
commit
c8c6267fae
@ -36,12 +36,14 @@ class MOSDPGNotify : public Message {
|
|||||||
vector<pair<pg_notify_t,pg_interval_map_t> > pg_list; // pgid -> version
|
vector<pair<pg_notify_t,pg_interval_map_t> > pg_list; // pgid -> version
|
||||||
|
|
||||||
public:
|
public:
|
||||||
version_t get_epoch() { return epoch; }
|
version_t get_epoch() const { return epoch; }
|
||||||
vector<pair<pg_notify_t,pg_interval_map_t> >& get_pg_list() { return pg_list; }
|
const vector<pair<pg_notify_t,pg_interval_map_t> >& get_pg_list() const {
|
||||||
|
return pg_list;
|
||||||
|
}
|
||||||
|
|
||||||
MOSDPGNotify()
|
MOSDPGNotify()
|
||||||
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION) {
|
: 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)
|
MOSDPGNotify(epoch_t e, vector<pair<pg_notify_t,pg_interval_map_t> >& l)
|
||||||
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION),
|
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION),
|
||||||
|
@ -8090,7 +8090,7 @@ void OSD::do_infos(map<int,
|
|||||||
*/
|
*/
|
||||||
void OSD::handle_pg_notify(OpRequestRef op)
|
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);
|
assert(m->get_type() == MSG_OSD_PG_NOTIFY);
|
||||||
|
|
||||||
dout(7) << "handle_pg_notify from " << m->get_source() << dendl;
|
dout(7) << "handle_pg_notify from " << m->get_source() << dendl;
|
||||||
@ -8104,10 +8104,9 @@ void OSD::handle_pg_notify(OpRequestRef op)
|
|||||||
|
|
||||||
op->mark_started();
|
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 != m->get_pg_list().end();
|
||||||
++it) {
|
++it) {
|
||||||
|
|
||||||
if (it->first.info.pgid.preferred() >= 0) {
|
if (it->first.info.pgid.preferred() >= 0) {
|
||||||
dout(20) << "ignoring localized pg " << it->first.info.pgid << dendl;
|
dout(20) << "ignoring localized pg " << it->first.info.pgid << dendl;
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user