]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix a logic error for setting block I/O
authorLei Li <lilei@linux.vnet.ibm.com>
Thu, 1 Dec 2011 07:55:26 +0000 (15:55 +0800)
committerEric Blake <eblake@redhat.com>
Thu, 1 Dec 2011 15:01:16 +0000 (08:01 -0700)
Fix a logic error, the initial value of ret = -1, if just set --config,
it will goto endjob directly without doing its really job here.

Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
src/qemu/qemu_driver.c

index ed90c66d3754ee3329e89988c2d0d7c2f5d8b62f..1e5ed9a9861541c1cc29204e7b5a2c484e6b1d0b 100644 (file)
@@ -11233,9 +11233,9 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
         qemuDomainObjEnterMonitorWithDriver(driver, vm);
         ret = qemuMonitorSetBlockIoThrottle(priv->mon, device, &info);
         qemuDomainObjExitMonitorWithDriver(driver, vm);
+        if (ret < 0)
+            goto endjob;
     }
-    if (ret < 0)
-        goto endjob;
 
     if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
         sa_assert(persistentDef && idx >= 0);