[PATCH 04/23] qemu: remove extra check for QEMU_BLOCK_IOTUNE_MAX

Nikolay Shirokovskiy posted 23 patches 5 years ago
[PATCH 04/23] qemu: remove extra check for QEMU_BLOCK_IOTUNE_MAX
Posted by Nikolay Shirokovskiy 5 years ago
This is checked in below call to qemuValidateDomainBlkdeviotune now. Note that
qemuValidateDomainBlkdeviotune does not check *_max_length values as we do
here. But I guess this is for good. I tried setting high _max_lengh values and
looks like their limits depend on *_max values and much less then
1000000000000000LL.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
---
 src/qemu/qemu_driver.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7337464..984b45d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16121,13 +16121,6 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
     for (i = 0; i < nparams; i++) {
         virTypedParameterPtr param = &params[i];
 
-        if (param->value.ul > QEMU_BLOCK_IOTUNE_MAX) {
-            virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED,
-                           _("block I/O throttle limit value must"
-                             " be no more than %llu"), QEMU_BLOCK_IOTUNE_MAX);
-            goto endjob;
-        }
-
         SET_IOTUNE_FIELD(total_bytes_sec, BYTES, TOTAL_BYTES_SEC);
         SET_IOTUNE_FIELD(read_bytes_sec, BYTES, READ_BYTES_SEC);
         SET_IOTUNE_FIELD(write_bytes_sec, BYTES, WRITE_BYTES_SEC);
-- 
1.8.3.1

Re: [PATCH 04/23] qemu: remove extra check for QEMU_BLOCK_IOTUNE_MAX
Posted by Peter Krempa 4 years, 11 months ago
On Mon, Jan 11, 2021 at 12:49:57 +0300, Nikolay Shirokovskiy wrote:
> This is checked in below call to qemuValidateDomainBlkdeviotune now. Note that
> qemuValidateDomainBlkdeviotune does not check *_max_length values as we do
> here. But I guess this is for good. I tried setting high _max_lengh values and
> looks like their limits depend on *_max values and much less then
> 1000000000000000LL.

fair enough.

> 
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
> ---
>  src/qemu/qemu_driver.c | 7 -------
>  1 file changed, 7 deletions(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>