]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: renamed the new vector name in OSDMap::build_simple_crush_map_from_conf 14583/head
authorJos Collin <jcollin@redhat.com>
Wed, 19 Apr 2017 02:53:04 +0000 (08:23 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 19 Apr 2017 02:53:10 +0000 (08:23 +0530)
Renamed the new vector name in OSDMap::build_simple_crush_map_from_conf, to avoid confusing it
with the sections vector outside the for loop and which is iterating.

Resolved merge conflicts.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/osd/OSDMap.cc

index 6ea693ec1a58da1d884a64d370711408f5b941f3..158250444cc59fc7c30a5241ed151b0fc36a7797 100644 (file)
@@ -3087,15 +3087,15 @@ int OSDMap::build_simple_crush_map_from_conf(CephContext *cct,
       continue;
 
     string host, rack, row, room, dc, pool;
-    vector<string> section;
-    section.push_back("osd");
-    section.push_back(*i);
-    conf->get_val_from_conf_file(section, "host", host, false);
-    conf->get_val_from_conf_file(section, "rack", rack, false);
-    conf->get_val_from_conf_file(section, "row", row, false);
-    conf->get_val_from_conf_file(section, "room", room, false);
-    conf->get_val_from_conf_file(section, "datacenter", dc, false);
-    conf->get_val_from_conf_file(section, "root", pool, false);
+    vector<string> sectiontmp;
+    sectiontmp.push_back("osd");
+    sectiontmp.push_back(section);
+    conf->get_val_from_conf_file(sectiontmp, "host", host, false);
+    conf->get_val_from_conf_file(sectiontmp, "rack", rack, false);
+    conf->get_val_from_conf_file(sectiontmp, "row", row, false);
+    conf->get_val_from_conf_file(sectiontmp, "room", room, false);
+    conf->get_val_from_conf_file(sectiontmp, "datacenter", dc, false);
+    conf->get_val_from_conf_file(sectiontmp, "root", pool, false);
 
     if (host.length() == 0)
       host = "unknownhost";