]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: use cct's crush_location
authorSage Weil <sage@redhat.com>
Tue, 29 Mar 2016 16:50:22 +0000 (12:50 -0400)
committerSage Weil <sage@redhat.com>
Mon, 9 May 2016 12:54:44 +0000 (08:54 -0400)
Keep the observer so that we refresh our copy of the multimap.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc

index 13ba2382b594017a9cf90085f3d368d63f6784bb..8552e6018cf0bda35453df2dd809f01d58adcbc3 100644 (file)
@@ -184,16 +184,7 @@ void Objecter::handle_conf_change(const struct md_config_t *conf,
 void Objecter::update_crush_location()
 {
   unique_lock wl(rwlock);
-  std::multimap<string,string> new_crush_location;
-  vector<string> lvec;
-  get_str_vec(cct->_conf->crush_location, ";, \t", lvec);
-  int r = CrushWrapper::parse_loc_multimap(lvec, &new_crush_location);
-  if (r < 0) {
-    lderr(cct) << "warning: crush_location '" << cct->_conf->crush_location
-              << "' does not parse, leave origin crush_location untouched." << dendl;
-    return;
-  }
-  crush_location = new_crush_location;
+  crush_location = cct->crush_location.get_location();
 }
 
 // messages ------------------------------