]> 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
authorJos Collin <jcollin@redhat.com>
Mon, 17 Apr 2017 04:50:10 +0000 (10:20 +0530)
committerJos Collin <jcollin@redhat.com>
Wed, 19 Apr 2017 01:15:39 +0000 (06:45 +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.

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

index a1507821c73a048742308ff6a63bb6a3b95d8dcf..6ea693ec1a58da1d884a64d370711408f5b941f3 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> sections;
-    sections.push_back("osd");
-    sections.push_back(section);
-    conf->get_val_from_conf_file(sections, "host", host, false);
-    conf->get_val_from_conf_file(sections, "rack", rack, false);
-    conf->get_val_from_conf_file(sections, "row", row, false);
-    conf->get_val_from_conf_file(sections, "room", room, false);
-    conf->get_val_from_conf_file(sections, "datacenter", dc, false);
-    conf->get_val_from_conf_file(sections, "root", pool, false);
+    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);
 
     if (host.length() == 0)
       host = "unknownhost";