summaryrefslogtreecommitdiffstats
path: root/blockdev.c
diff options
context:
space:
mode:
authorStefan Hajnoczi2015-08-04 12:22:12 +0200
committerStefan Hajnoczi2015-08-05 13:53:48 +0200
commitee2bdc33c913b7d765baa5aa338c29fb30a05c9a (patch)
tree265d6b583e53dd9341919bea5233998b61801f6d /blockdev.c
parentMerge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into st... (diff)
downloadqemu-ee2bdc33c913b7d765baa5aa338c29fb30a05c9a.tar.gz
qemu-ee2bdc33c913b7d765baa5aa338c29fb30a05c9a.tar.xz
qemu-ee2bdc33c913b7d765baa5aa338c29fb30a05c9a.zip
throttle: refuse bps_max/iops_max without bps/iops
The bps_max/iops_max values are meaningless without corresponding bps/iops values. Reported an error if bps_max/iops_max is given without bps/iops. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 1438683733-21111-2-git-send-email-stefanha@redhat.com
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c
index 62a4586cd6..4125ff642a 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -337,6 +337,12 @@ static bool check_throttle_config(ThrottleConfig *cfg, Error **errp)
return false;
}
+ if (throttle_max_is_missing_limit(cfg)) {
+ error_setg(errp, "bps_max/iops_max require corresponding"
+ " bps/iops values");
+ return false;
+ }
+
return true;
}