diff mbox

[3/4] qemu: Remove redundant qemuDomainAssignAddresses calls

Message ID 40944cfd4c0f7821c65bfc0f3d2ff8f9baa8fae4.1463255562.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson May 14, 2016, 8 p.m. UTC
All these calls come near immediately after parsing the domain
XML, which now triggers qemuDomainAssignAddresses. So drop the
now redundnat calls
---
 src/qemu/qemu_driver.c | 19 -------------------
 1 file changed, 19 deletions(-)

-- 
2.7.4

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

Comments

Cole Robinson May 18, 2016, 6:37 p.m. UTC | #1
On 05/17/2016 10:42 AM, Andrea Bolognani wrote:
> On Sat, 2016-05-14 at 16:00 -0400, Cole Robinson wrote:

>> All these calls come near immediately after parsing the domain

>> XML, which now triggers qemuDomainAssignAddresses. So drop the

>> now redundnat calls

>> ---

>>   src/qemu/qemu_driver.c | 19 -------------------

>>   1 file changed, 19 deletions(-)

> 

> This would make more sense squashed together with the previous

> commit IMHO.

> 

> ACK either way.

> 


I wanted to keep it separate incase I missed something in this part or this
part was more contentious. But I've squashed it into the previous patch

Thanks,
Cole

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

Patch

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 37d970e..f47c620 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1771,7 +1771,6 @@  static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
     virObjectEventPtr event = NULL;
     virObjectEventPtr event2 = NULL;
     unsigned int start_flags = VIR_QEMU_PROCESS_START_COLD;
-    virQEMUCapsPtr qemuCaps = NULL;
     virCapsPtr caps = NULL;
     unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
                                VIR_DOMAIN_DEF_PARSE_ABI_UPDATE;
@@ -1799,12 +1798,6 @@  static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
     if (virDomainCreateXMLEnsureACL(conn, def) < 0)
         goto cleanup;
 
-    if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
-        goto cleanup;
-
-    if (qemuDomainAssignAddresses(def, qemuCaps, NULL) < 0)
-        goto cleanup;
-
     if (!(vm = virDomainObjListAdd(driver->domains, def,
                                    driver->xmlopt,
                                    VIR_DOMAIN_OBJ_LIST_ADD_LIVE |
@@ -1858,7 +1851,6 @@  static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
         qemuDomainEventQueue(driver, event2);
     }
     virObjectUnref(caps);
-    virObjectUnref(qemuCaps);
     virNWFilterUnlockFilterUpdates();
     return dom;
 }
@@ -7249,7 +7241,6 @@  static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
     virObjectEventPtr event = NULL;
-    virQEMUCapsPtr qemuCaps = NULL;
     virQEMUDriverConfigPtr cfg;
     virCapsPtr caps = NULL;
     unsigned int parse_flags = VIR_DOMAIN_DEF_PARSE_INACTIVE |
@@ -7272,12 +7263,6 @@  static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
     if (virDomainDefineXMLFlagsEnsureACL(conn, def) < 0)
         goto cleanup;
 
-    if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator)))
-        goto cleanup;
-
-    if (qemuDomainAssignAddresses(def, qemuCaps, NULL) < 0)
-        goto cleanup;
-
     if (!(vm = virDomainObjListAdd(driver->domains, def,
                                    driver->xmlopt,
                                    0, &oldDef)))
@@ -7328,7 +7313,6 @@  static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml
     virDomainDefFree(def);
     virDomainObjEndAPI(&vm);
     qemuDomainEventQueue(driver, event);
-    virObjectUnref(qemuCaps);
     virObjectUnref(caps);
     virObjectUnref(cfg);
     return dom;
@@ -15975,9 +15959,6 @@  static virDomainPtr qemuDomainQemuAttach(virConnectPtr conn,
     if (qemuAssignDeviceAliases(def, qemuCaps) < 0)
         goto cleanup;
 
-    if (qemuDomainAssignAddresses(def, qemuCaps, NULL) < 0)
-        goto cleanup;
-
     if (!(vm = virDomainObjListAdd(driver->domains, def,
                                    driver->xmlopt,
                                    VIR_DOMAIN_OBJ_LIST_ADD_LIVE |