From: J. Eric Ivancich Date: Wed, 29 Mar 2017 13:32:49 +0000 (-0400) Subject: os/bluestore: make live changes for BlueStore throttle config work like initial config X-Git-Tag: v12.0.2~243^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4db915a03d8effe7885547c1dea9ce449fe1e6db;p=ceph.git os/bluestore: make live changes for BlueStore throttle config work like initial config Make live changes of configuration options bluestore_max_ops, bluestore_max_bytes, bluestore_deferred_max_ops, bluestore_deferred_max_bytes work the same way as initial configuration. Specifically, the deferred throttles have a max to be the sum of the deferred value and the non-deferred value during initial configuration, so live changes now work this way. Signed-off-by: J. Eric Ivancich --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 3c78e4a0c5fc..67632d2f57bf 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -3325,15 +3325,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); } }