mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
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
This commit is contained in:
parent
2be4f242b5
commit
ee2bdc33c9
3 changed files with 23 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue