[libvirt] [PATCH v2 05/10] qemu_hotplug: generate ccw address list on demand

Martin Kletzander mkletzan at redhat.com
Mon Jul 25 15:11:26 UTC 2016


On Sat, Jul 23, 2016 at 03:47:10AM +0200, Tomasz Flendrich wrote:
>Dropping the caching of ccw address set.
>Instead of using the cached address set, functions in qemu_hotplug.c
>now recalculate it on demand.
>---
> src/qemu/qemu_hotplug.c | 26 +++++++++++++++++++++-----
> 1 file changed, 21 insertions(+), 5 deletions(-)
>
>diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
>index 5c82361..3deeb0b 100644
>--- a/src/qemu/qemu_hotplug.c
>+++ b/src/qemu/qemu_hotplug.c
>@@ -337,7 +338,9 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
>         goto cleanup;
>
>     if (disk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_CCW) {
>-        if (virDomainCCWAddressAssign(&disk->info, priv->ccwaddrs,
>+        if (!(ccwaddrs = qemuDomainCCWAddrSetCreateFromDomain(vm->def)))
>+            goto error;
>+        if (virDomainCCWAddressAssign(&disk->info, ccwaddrs,
>                                       !disk->info.addr.ccw.assigned) < 0)

Ideally, we would create a wrapper for these two functions but that's
just a nit for the future.  Also just a guess, maybe it'll turn out that
we won't need it at all...

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160725/a02d9832/attachment-0001.sig>


More information about the libvir-list mailing list