<< " to " << con << " " << con->get_peer_addr() << dendl;
MOSDMap *m = NULL;
- while (!m) {
- OSDSuperblock sblock(get_superblock());
- if (since < sblock.get_oldest_map()) {
- // just send latest full map
- MOSDMap *m = new MOSDMap(monc->get_fsid(),
- osdmap->get_encoding_features());
- m->cluster_osdmap_trim_lower_bound = sblock.cluster_osdmap_trim_lower_bound;
- m->newest_map = sblock.get_newest_map();
- get_map_bl(to, m->maps[to]);
- send_map(m, con);
- return;
- }
-
+ OSDSuperblock sblock(get_superblock());
+ if (since < sblock.get_oldest_map()) {
+ // just send latest full map
+ m = new MOSDMap(monc->get_fsid(),
+ osdmap->get_encoding_features());
+ m->cluster_osdmap_trim_lower_bound = sblock.cluster_osdmap_trim_lower_bound;
+ m->newest_map = sblock.get_newest_map();
+ get_map_bl(to, m->maps[to]);
+ } else {
if (to > since && (int64_t)(to - since) > cct->_conf->osd_map_share_max_epochs) {
- dout(10) << " " << (to - since) << " > max " << cct->_conf->osd_map_share_max_epochs
- << ", only sending most recent" << dendl;
+ dout(10) << " " << (to - since) << " > max "
+ << cct->_conf->osd_map_share_max_epochs
+ << ", only sending most recent" << dendl;
since = to - cct->_conf->osd_map_share_max_epochs;
}