]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: This logic is slightly less confusing without the always-true 'full' param
authorGreg Farnum <gregf@hq.newdream.net>
Fri, 6 Nov 2009 23:27:23 +0000 (15:27 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 6 Nov 2009 23:27:32 +0000 (15:27 -0800)
src/osd/OSD.cc
src/osd/OSD.h

index fe4b0aa4818ca29b01f5e4c17db81b2dea413c3e..8520eb038f176b71443576a4961fa438b9602a84 100644 (file)
@@ -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;
     }
index 3153af1ef314401a84759575ec02e42b819a763d..cfff8e7fed2d03b8863fee08e296faa0056d071f 100644 (file)
@@ -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: