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 ------------------------------