From: Greg Farnum Date: Fri, 6 Nov 2009 23:27:23 +0000 (-0800) Subject: osd: This logic is slightly less confusing without the always-true 'full' param X-Git-Tag: v0.18~128^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b2a1c3055a0d29a598f92a5f3f28ce9fa9a9112c;p=ceph.git osd: This logic is slightly less confusing without the always-true 'full' param --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index fe4b0aa4818c..8520eb038f17 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1402,7 +1402,7 @@ bool OSD::_share_map_incoming(const entity_inst_t& inst, epoch_t epoch) if (inst.name.is_client()) { if (epoch < osdmap->get_epoch()) { dout(10) << inst.name << " has old map " << epoch << " < " << osdmap->get_epoch() << dendl; - send_incremental_map(epoch, inst, true); + send_incremental_map(epoch, inst); shared = true; } } @@ -1422,7 +1422,7 @@ bool OSD::_share_map_incoming(const entity_inst_t& inst, epoch_t epoch) if (peer_map_epoch[inst.name] < osdmap->get_epoch()) { dout(10) << inst.name << " has old map " << epoch << " < " << osdmap->get_epoch() << dendl; peer_map_epoch[inst.name] = osdmap->get_epoch(); // so we don't send it again. - send_incremental_map(epoch, osdmap->get_inst(inst.name.num()), true); + send_incremental_map(epoch, osdmap->get_inst(inst.name.num())); shared = true; } } @@ -1439,7 +1439,7 @@ void OSD::_share_map_outgoing(const entity_inst_t& inst) if (peer_map_epoch.count(inst.name)) { epoch_t pe = peer_map_epoch[inst.name]; if (pe < osdmap->get_epoch()) { - send_incremental_map(pe, inst, true); + send_incremental_map(pe, inst); peer_map_epoch[inst.name] = osdmap->get_epoch(); } } else { @@ -2277,7 +2277,7 @@ void OSD::activate_map(ObjectStore::Transaction& t) } -void OSD::send_incremental_map(epoch_t since, const entity_inst_t& inst, bool full, bool lazy) +void OSD::send_incremental_map(epoch_t since, const entity_inst_t& inst, bool lazy) { dout(10) << "send_incremental_map " << since << " -> " << osdmap->get_epoch() << " to " << inst << dendl; @@ -2292,7 +2292,7 @@ void OSD::send_incremental_map(epoch_t since, const entity_inst_t& inst, bool fu m->incremental_maps[e].claim(bl); } else if (get_map_bl(e,bl)) { m->maps[e].claim(bl); - if (!full) break; + break; } else { assert(0); // we should have all maps. @@ -2428,7 +2428,7 @@ bool OSD::require_same_or_newer_map(Message *m, epoch_t epoch) if (!osdmap->have_inst(from) || osdmap->get_addr(from) != m->get_source_inst().addr) { dout(-7) << "from dead osd" << from << ", dropping, sharing map" << dendl; - send_incremental_map(epoch, m->get_source_inst(), true, true); + send_incremental_map(epoch, m->get_source_inst(), true); delete m; return false; } diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 3153af1ef314..cfff8e7fed2d 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -412,7 +412,7 @@ private: bool get_inc_map_bl(epoch_t e, bufferlist& bl); bool get_inc_map(epoch_t e, OSDMap::Incremental &inc); - void send_incremental_map(epoch_t since, const entity_inst_t& inst, bool full, bool lazy=false); + void send_incremental_map(epoch_t since, const entity_inst_t& inst, bool lazy=false); protected: