// client needs earlier osdmaps on purpose, so reset the sent epoch
s->osd_epoch = 0;
}
- osdmon()->check_sub(s->sub_map["osdmap"]);
+ osdmon()->check_osdmap_sub(s->sub_map["osdmap"]);
}
} else if (p->first == "osd_pg_creates") {
if ((int)s->is_capable("osd", MON_CAP_W)) {
mon->pgmon()->check_osd_map(osdmap.epoch);
}
- check_subs();
+ check_osdmap_subs();
share_map_with_random_osd();
update_logger();
}
-void OSDMonitor::check_subs()
+void OSDMonitor::check_osdmap_subs()
{
dout(10) << __func__ << dendl;
- string type = "osdmap";
- if (mon->session_map.subs.count(type) == 0)
+ auto osdmap_subs = mon->session_map.subs.find("osdmap");
+ if (osdmap_subs == mon->session_map.subs.end()) {
return;
- xlist<Subscription*>::iterator p = mon->session_map.subs[type]->begin();
+ }
+ auto p = osdmap_subs->second->begin();
while (!p.end()) {
- Subscription *sub = *p;
+ auto sub = *p;
++p;
- check_sub(sub);
+ check_osdmap_sub(sub);
}
}
-void OSDMonitor::check_sub(Subscription *sub)
+void OSDMonitor::check_osdmap_sub(Subscription *sub)
{
dout(10) << __func__ << " " << sub << " next " << sub->next
<< (sub->onetime ? " (onetime)":" (ongoing)") << dendl;
*/
bool validate_crush_against_features(const CrushWrapper *newcrush,
stringstream &ss);
-
+ void check_osdmap_subs();
void share_map_with_random_osd();
Mutex prime_pg_temp_lock = {"OSDMonitor::prime_pg_temp_lock"};
int dump_osd_metadata(int osd, Formatter *f, ostream *err);
void print_nodes(Formatter *f);
- void check_subs();
- void check_sub(Subscription *sub);
+ void check_osdmap_sub(Subscription *sub);
void add_flag(int flag) {
if (!(osdmap.flags & flag)) {