Merge pull request #14225 from ivancich/wip_fix_throttle_config_change

os/bluestore: make live changes for BlueStore throttle config work like initial config

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-03-31 20:52:59 -05:00 committed by GitHub
commit b19613f8ab

View File

@ -3285,15 +3285,21 @@ void BlueStore::handle_conf_change(const struct md_config_t *conf,
}
if (changed.count("bluestore_max_ops")) {
throttle_ops.reset_max(conf->bluestore_max_ops);
throttle_deferred_ops.reset_max(
conf->bluestore_max_ops + conf->bluestore_deferred_max_ops);
}
if (changed.count("bluestore_max_bytes")) {
throttle_bytes.reset_max(conf->bluestore_max_bytes);
throttle_deferred_bytes.reset_max(
conf->bluestore_max_bytes + conf->bluestore_deferred_max_bytes);
}
if (changed.count("bluestore_deferred_max_ops")) {
throttle_deferred_ops.reset_max(conf->bluestore_deferred_max_ops);
throttle_deferred_ops.reset_max(
conf->bluestore_max_ops + conf->bluestore_deferred_max_ops);
}
if (changed.count("bluestore_deferred_max_bytes")) {
throttle_deferred_bytes.reset_max(conf->bluestore_deferred_max_bytes);
throttle_deferred_bytes.reset_max(
conf->bluestore_max_bytes + conf->bluestore_deferred_max_bytes);
}
}