]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: remove never-activated while loop from send_incremental_map
authorGreg Farnum <greg@inktank.com>
Tue, 25 Mar 2014 04:38:48 +0000 (21:38 -0700)
committerGreg Farnum <greg@inktank.com>
Mon, 5 May 2014 22:29:15 +0000 (15:29 -0700)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/OSD.cc

index 1ab4fd26b630333ad20d233464fd9ada42e13856..413ec50780fa15a52689eee7b8807e2d6747321e 100644 (file)
@@ -5991,13 +5991,10 @@ void OSD::send_incremental_map(epoch_t since, Connection *con)
     since = to - cct->_conf->osd_map_share_max_epochs;
   }
 
-  while (since < to) {
-    if (to - since > (epoch_t)cct->_conf->osd_map_message_max)
-      to = since + cct->_conf->osd_map_message_max;
-    MOSDMap *m = build_incremental_map_msg(since, to);
-    send_map(m, con);
-    since = to;
-  }
+  if (to - since > (epoch_t)cct->_conf->osd_map_message_max)
+    to = since + cct->_conf->osd_map_message_max;
+  MOSDMap *m = build_incremental_map_msg(since, to);
+  send_map(m, con);
 }
 
 bool OSDService::_get_map_bl(epoch_t e, bufferlist& bl)