[PATCH 13/23] qemu: use group_name instead of QEMU_BLOCK_IOTUNE_SET_GROUP_NAME

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need qemuBlockIoTuneSetFlags to distinguish cases when some tune is not set
from tune is set explicitly to 0. We don't have the latter case for the group
name and don't need QEMU_BLOCK_IOTUNE_SET_GROUP_NAME.

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

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 15ccf90..61be425 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15921,7 +15921,7 @@ qemuDomainSetBlockIoTuneDefaults(virDomainBlockIoTuneInfoPtr newinfo,
 
     if (!(set_fields & QEMU_BLOCK_IOTUNE_SET_SIZE_IOPS))
         newinfo->size_iops_sec = oldinfo->size_iops_sec;
-    if (!(set_fields & QEMU_BLOCK_IOTUNE_SET_GROUP_NAME))
+    if (!newinfo->group_name)
         newinfo->group_name = g_strdup(oldinfo->group_name);
 
     /* The length field is handled a bit differently. If not defined/set,
@@ -16165,7 +16165,6 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
         /* NB: Cannot use macro since this is a value.s not a value.ul */
         if (STREQ(param->field, VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME)) {
             info.group_name = g_strdup(param->value.s);
-            set_fields |= QEMU_BLOCK_IOTUNE_SET_GROUP_NAME;
             if (virTypedParamsAddString(&eventParams, &eventNparams,
                                         &eventMaxparams,
                                         VIR_DOMAIN_TUNABLE_BLKDEV_GROUP_NAME,
-- 
1.8.3.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux