]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdmap: move osd_cluster_addr decoding, and make sure that size matches osd_addr
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 8 Jul 2010 19:06:08 +0000 (12:06 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Tue, 3 Aug 2010 21:56:01 +0000 (14:56 -0700)
src/osd/OSDMap.h

index 4020246eef9bd2176e79b9a71645d217d07c0fa4..58fff5561e8f617ec1fd526e71f0224154e76b00 100644 (file)
@@ -560,10 +560,6 @@ private:
       osd_info[i->first].down_at = epoch;
       //cout << "epoch " << epoch << " down osd" << i->first << endl;
     }
-    for (map<int32_t,entity_addr_t>::iterator i = inc.new_up_internal.begin();
-        i != inc.new_up_internal.end();
-        ++i)
-      osd_cluster_addr[i->first] = i->second;
     for (map<int32_t,entity_addr_t>::iterator i = inc.new_up_client.begin();
          i != inc.new_up_client.end();
          i++) {
@@ -578,7 +574,12 @@ private:
       osd_info[i->first].up_from = epoch;
       //cout << "epoch " << epoch << " up osd" << i->first << " at " << i->second << "with hb addr" << osd_hb_addr[i->first] << std::endl;
     }
-
+    for (map<int32_t,entity_addr_t>::iterator i = inc.new_up_internal.begin();
+        i != inc.new_up_internal.end();
+        ++i)
+      osd_cluster_addr[i->first] = i->second;
+    if (osd_cluster_addr.size() != osd_addr.size())
+        osd_cluster_addr.resize(osd_addr.size());
     // info
     for (map<int32_t,epoch_t>::iterator i = inc.new_up_thru.begin();
          i != inc.new_up_thru.end();