diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/throttle.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/throttle.c b/util/throttle.c index 80660ffd2c..b8c524336c 100644 --- a/util/throttle.c +++ b/util/throttle.c @@ -354,6 +354,11 @@ bool throttle_is_valid(ThrottleConfig *cfg, Error **errp) return false; } + if (bkt->max && bkt->burst_length > THROTTLE_VALUE_MAX / bkt->max) { + error_setg(errp, "burst length too high for this burst rate"); + return false; + } + if (bkt->max && !bkt->avg) { error_setg(errp, "bps_max/iops_max require corresponding" " bps/iops values"); |