[PATCH 01/23] qemu: pass supportGroupNameOption as expected

Nikolay Shirokovskiy posted 23 patches 5 years ago
[PATCH 01/23] qemu: pass supportGroupNameOption as expected
Posted by Nikolay Shirokovskiy 5 years ago
supportGroupNameOption was originally passed before the below patch. To solve
the issue of that patch this change is not necessary and it make sense to
pass supportGroupNameOption because of qemuMonitorSetBlockIoThrottle
signature.

With patch group_name is passed to qemu if disk in iotune group but group
is not passed explicitly in parametes. For qemu it does not make a difference.

I'm preparing here for the next patch where another usage of
supportGroupNameOption will gone and instead of deleting supportGroupNameOption
variable altogether I guess it is better to restore it's proper usage.

commit e9d75343d4cf552575a3b305fa00a36ee71e9309
Author: Martin Kletzander <mkletzan@redhat.com>
Date:   Tue Jan 24 15:50:00 2017 +0100

    qemu: Only set group_name when actually requested

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

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 027617d..b7f22c2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16310,7 +16310,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
             qemuDomainObjEnterMonitor(driver, vm);
             ret = qemuMonitorSetBlockIoThrottle(priv->mon, drivealias, qdevid,
                                                 &info, supportMaxOptions,
-                                                set_fields & QEMU_BLOCK_IOTUNE_SET_GROUP_NAME,
+                                                supportGroupNameOption,
                                                 supportMaxLengthOptions);
             if (qemuDomainObjExitMonitor(driver, vm) < 0)
                 ret = -1;
-- 
1.8.3.1

Re: [PATCH 01/23] qemu: pass supportGroupNameOption as expected
Posted by Peter Krempa 4 years, 11 months ago
On Mon, Jan 11, 2021 at 12:49:54 +0300, Nikolay Shirokovskiy wrote:
> supportGroupNameOption was originally passed before the below patch. To solve
> the issue of that patch this change is not necessary and it make sense to
> pass supportGroupNameOption because of qemuMonitorSetBlockIoThrottle
> signature.
>
> With patch group_name is passed to qemu if disk in iotune group but group
> is not passed explicitly in parametes. For qemu it does not make a difference.

We always set all the fields in qemu, so arguably this is fixing the
behaviour also for the group name.

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