lderr(cct) << __func__ << " failed to set " << i.first << " = "
<< i.second << ": " << err << dendl;
ignored_mon_values.emplace(i);
- } else if (r == 0) {
+ } else if (r == ConfigValues::SET_NO_CHANGE ||
+ r == ConfigValues::SET_NO_EFFECT) {
ldout(cct,20) << __func__ << " " << i.first << " = " << i.second
<< " (no change)" << dendl;
- } else if (r == 1) {
+ } else if (r == ConfigValues::SET_HAVE_EFFECT) {
ldout(cct,10) << __func__ << " " << i.first << " = " << i.second << dendl;
} else {
ceph_abort();
auto result = values.set_value(opt.name, std::move(new_value), level);
switch (result) {
case ConfigValues::SET_NO_CHANGE:
- return 0;
+ break;
case ConfigValues::SET_NO_EFFECT:
values_bl.clear();
- return 0;
+ break;
case ConfigValues::SET_HAVE_EFFECT:
- // fallthrough
- default:
values_bl.clear();
_refresh(values, opt);
- return 1;
+ break;
}
+ return result;
}
void md_config_t::_refresh(ConfigValues& values, const Option& opt)
std::vector<const char*>& args,
std::ostream *oss);
+ // @returns negative number for an error, otherwise a
+ // @c ConfigValues::set_value_result_t is returned.
int _set_val(
ConfigValues& values,
const ConfigTracker& tracker,