Re: [libvirt] [PATCH v2 03/12] qemu: Move setting of conf_disk in qemuDomainSetBlockIoTune

2016-10-24 Thread Erik Skultety
On Thu, Oct 06, 2016 at 06:38:51PM -0400, John Ferlan wrote:
> Since persistent_def is the only place that uses it, let's just keep
> it closer to where it's used.
> 
> Signed-off-by: John Ferlan 
> ---
>  src/qemu/qemu_driver.c | 15 ++-
>  1 file changed, 6 insertions(+), 9 deletions(-)

ACK

Erik


signature.asc
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH v2 03/12] qemu: Move setting of conf_disk in qemuDomainSetBlockIoTune

2016-10-06 Thread John Ferlan
Since persistent_def is the only place that uses it, let's just keep
it closer to where it's used.

Signed-off-by: John Ferlan 
---
 src/qemu/qemu_driver.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 3ce3f2d..78e917e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -17449,15 +17449,6 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
 goto endjob;
 }
 
-if (persistentDef) {
-if (!(conf_disk = virDomainDiskByName(persistentDef, path, true))) {
-virReportError(VIR_ERR_INVALID_ARG,
-   _("missing persistent configuration for disk '%s'"),
-   path);
-goto endjob;
-}
-}
-
 if (def) {
 supportMaxOptions = virQEMUCapsGet(priv->qemuCaps,
QEMU_CAPS_DRIVE_IOTUNE_MAX);
@@ -17550,6 +17541,12 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
 }
 
 if (persistentDef) {
+if (!(conf_disk = virDomainDiskByName(persistentDef, path, true))) {
+virReportError(VIR_ERR_INVALID_ARG,
+   _("missing persistent configuration for disk '%s'"),
+   path);
+goto endjob;
+}
 oldinfo = _disk->blkdeviotune;
 if (!set_bytes) {
 info.total_bytes_sec = oldinfo->total_bytes_sec;
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list