Re: [PATCH RFC 2/5] qemu_hotplug: use a recalculated usb address set

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

 



On Sat, Aug 20, 2016 at 04:53:04PM +0200, Tomasz Flendrich wrote:
Since we now have a way of relculating the usb address set, all the
places that previously used the cached set now use the recalculated one.
---
src/qemu/qemu_hotplug.c | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 51f06bc..078d936 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -738,13 +738,13 @@ qemuDomainAttachUSBMassStorageDevice(virQEMUDriverPtr driver,
    bool driveAdded = false;
    virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
    const char *src = virDomainDiskGetSource(disk);
-    bool releaseaddr = false;
+    virDomainUSBAddressSetPtr usbaddrs = NULL;

-    if (priv->usbaddrs) {

This condition was only true when we assigned the domain addresses on
domain startup (if it's a new domain, not migrated)...

-        if (virDomainUSBAddressEnsure(priv->usbaddrs, &disk->info) < 0)
-            goto cleanup;
-        releaseaddr = true;
-    }
+    if (!(usbaddrs = qemuDomainUSBAddrSetCreateFromDomain(vm->def)))
+        goto cleanup;

but this new helper does it unconditionally.

Jan

Attachment: signature.asc
Description: Digital signature

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

[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]