[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.7 2/5] throttle: Don't allow burst limits to be
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL for-2.7 2/5] throttle: Don't allow burst limits to be lower than the normal limits |
Date: |
Fri, 5 Aug 2016 10:24:39 +0100 |
From: Alberto Garcia <address@hidden>
Setting FOO_max to a value that is lower than FOO does not make
sense, and it produces odd results depending on the value of
FOO_max_length. Although the user should not set that configuration
in the first place it's better to reject it explicitly.
https://bugzilla.redhat.com/show_bug.cgi?id=1355665
Signed-off-by: Alberto Garcia <address@hidden>
Reported-by: Gu Nini <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
util/throttle.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/util/throttle.c b/util/throttle.c
index 654f95c..3817d9b 100644
--- a/util/throttle.c
+++ b/util/throttle.c
@@ -348,6 +348,11 @@ bool throttle_is_valid(ThrottleConfig *cfg, Error **errp)
" bps/iops values");
return false;
}
+
+ if (cfg->buckets[i].max && cfg->buckets[i].max < cfg->buckets[i].avg) {
+ error_setg(errp, "bps_max/iops_max cannot be lower than bps/iops");
+ return false;
+ }
}
return true;
--
2.7.4
- [Qemu-devel] [PULL for-2.7 0/5] Block patches, Stefan Hajnoczi, 2016/08/05
- [Qemu-devel] [PULL for-2.7 1/5] block/parallels: check new image size, Stefan Hajnoczi, 2016/08/05
- [Qemu-devel] [PULL for-2.7 2/5] throttle: Don't allow burst limits to be lower than the normal limits,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL for-2.7 3/5] throttle: Test burst limits lower than the normal limits, Stefan Hajnoczi, 2016/08/05
- [Qemu-devel] [PULL for-2.7 5/5] virtio-blk: Remove stale comment about draining, Stefan Hajnoczi, 2016/08/05
- [Qemu-devel] [PULL for-2.7 4/5] virtio-blk: Release s->rq queue at system_reset, Stefan Hajnoczi, 2016/08/05
- Re: [Qemu-devel] [PULL for-2.7 0/5] Block patches, Peter Maydell, 2016/08/05