On Mon, Mar 30, 2015 at 07:19:42PM +0300, Alberto Garcia wrote:
> @@ -1941,9 +1951,11 @@ void qmp_block_set_io_throttle(const char *device,
> int64_t bps, int64_t bps_rd,
> aio_context_acquire(aio_context);
>
> if (!bs->io_limits_enabled && throttle_enabled(&cfg)) {
> - bdrv_io_limits_enable(bs);
> + bdrv_io_limits_enable(bs, has_group ? group : device);
> } else if (bs->io_limits_enabled && !throttle_enabled(&cfg)) {
> bdrv_io_limits_disable(bs);
> + } else if (bs->io_limits_enabled && throttle_enabled(&cfg)) {
> + bdrv_io_limits_update_group(bs, has_group ? group : device);
> }
>
> if (bs->io_limits_enabled) {The semantics are inconsistent: 1. Create drive0 with throttle group "mygroup". 2. Issue block-set-io-throttle device="drive0" The result is that a new throttle group called "drive0" is created. I expected to modify the throttling configuration for drive0 (i.e. "mygroup"). Now let's disable the throttle group: 3. Issue block-set-io-throttle with 0 values for device="drive0" The result is that "mygroup" is changed to all 0s. Enable should behave like disable and operate on the device's throttle group. Stefan
pgpIzGAvynClC.pgp
Description: PGP signature
