if (osdmap->is_up(from)) {
note_peer_epoch(from, m->map_epoch);
if (locked && is_active())
- _share_map_outgoing(osdmap->get_cluster_inst(from));
+ _share_map_outgoing(service.get_osdmap()->get_cluster_inst(from));
}
}
break;
}
if (m->map_epoch && // peer may not have gotten map_lock on ping reply
- osdmap->is_up(from)) {
+ service.get_osdmap()->is_up(from)) {
note_peer_epoch(from, m->map_epoch);
if (locked && is_active())
- _share_map_outgoing(osdmap->get_cluster_inst(from));
+ _share_map_outgoing(service.get_osdmap()->get_cluster_inst(from));
}
}
break;
}
-void OSD::_share_map_outgoing(const entity_inst_t& inst)
+void OSD::_share_map_outgoing(const entity_inst_t& inst,
+ OSDMapRef map)
{
+ if (!map)
+ map = service.get_osdmap();
assert(inst.name.is_osd());
int peer = inst.name.num();
// send map?
epoch_t pe = get_peer_epoch(peer);
if (pe) {
- if (pe < osdmap->get_epoch()) {
+ if (pe < map->get_epoch()) {
send_incremental_map(pe, inst);
- note_peer_epoch(peer, osdmap->get_epoch());
+ note_peer_epoch(peer, map->get_epoch());
} else
dout(20) << "_share_map_outgoing " << inst << " already has epoch " << pe << dendl;
} else {
bool _share_map_incoming(const entity_inst_t& inst, epoch_t epoch,
Session *session = 0);
- void _share_map_outgoing(const entity_inst_t& inst);
+ void _share_map_outgoing(const entity_inst_t& inst,
+ OSDMapRef map = OSDMapRef());
void wait_for_new_map(OpRequestRef op);
void handle_osd_map(class MOSDMap *m);
dout(10) << " sending " << mlog->log << " " << mlog->missing << dendl;
- osd->osd->_share_map_outgoing(get_osdmap()->get_cluster_inst(from));
+ osd->osd->_share_map_outgoing(get_osdmap()->get_cluster_inst(from),
+ get_osdmap());
osd->cluster_messenger->send_message(mlog,
get_osdmap()->get_cluster_inst(from));
}