diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-07 15:59:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-06-07 15:59:28 +0100 |
commit | 40eeb397c8b8008aa13bca3a8cb25d152eb5ab44 (patch) | |
tree | df56d2c82e9a30cd6db98ad0d480ea27c959cc9a /util | |
parent | 79cecb3520606c55f427752c0a7a4add8afe2413 (diff) | |
parent | 8860eabdee32f78d9a34273a340b8f74476bc9a0 (diff) |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Tue 07 Jun 2016 15:26:09 BST
# gpg: using RSA key 0x9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
* remotes/stefanha/tags/block-pull-request:
throttle: refuse iops-size without iops-total/read/write
block: Drop bdrv_ioctl_bh_cb
block: Move BlockRequest type to io.c
block/io: optimize bdrv_co_pwritev for small requests
iostatus: fix comments for block_job_iostatus_reset
block/io: Remove unused bdrv_aio_write_zeroes()
virtio: drop duplicate virtio_queue_get_id() function
virtio-scsi: Remove op blocker for dataplane
virtio-blk: Remove op blocker for dataplane
blockdev-backup: Don't move target AioContext if it's attached
blockdev-backup: Use bdrv_lookup_bs on target
tests: avoid coroutine pool test crash
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/throttle.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/util/throttle.c b/util/throttle.c index 71246b2343..654f95caf2 100644 --- a/util/throttle.c +++ b/util/throttle.c @@ -315,6 +315,14 @@ bool throttle_is_valid(ThrottleConfig *cfg, Error **errp) return false; } + if (cfg->op_size && + !cfg->buckets[THROTTLE_OPS_TOTAL].avg && + !cfg->buckets[THROTTLE_OPS_READ].avg && + !cfg->buckets[THROTTLE_OPS_WRITE].avg) { + error_setg(errp, "iops size requires an iops value to be set"); + return false; + } + for (i = 0; i < BUCKETS_COUNT; i++) { if (cfg->buckets[i].avg < 0 || cfg->buckets[i].max < 0 || |