[libvirt] [PATCH 4/6] Also create the USB address cache for domains with all the USB addresses

Ján Tomko jtomko at redhat.com
Thu Oct 27 11:44:51 UTC 2016


On Tue, Oct 25, 2016 at 08:11:31AM -0400, John Ferlan wrote:
>$SUBJ...
>
>The "Also" just seems misplaced.
>
>especially with the "Also generate the..." below...
>

Me fail English? That's unpossible!

>How about "At Reconnect, recreate the USB address cache"
>
>?

That is not exhaustive, but probably better as the commit summary.

What I meant to say is that now the address cache is created not
only for new domains, but also for those that already have all the
addresses assigned. Whether they were assigned by the user, or by
libvirt.

>
>On 10/21/2016 09:58 AM, Ján Tomko wrote:
>> When starting a new domain, we allocate the USB addresses and keep
>> an address cache in the domain object's private data.
>>
>> However this data is lost on libvirtd restart.
>
>The qemuProcessReconnect will call qemuDomainAssignAddresses w/
>newDomain = false, so this code needs to "repopulate" the usbaddr cache
>properly, but can only properly do so if all the USB addresses for the
>domain were specified in the domain XML.
>
>In this path are we getting the status XML file which "should" have all
>the addresses, right?
>

Not necessarily. The whole point of these conditions is to prevent
libvirt from assigning USB addresses to the old domains that had at
least one USB device without an address, because if we specify it on
QEMU command line, QEMU might auto-add a hub that is not reflected
in domain XML.

So domains that were defined with libvirt new enough or that had their
addresses assigned manually will get an address cache here, the rest
will not.

>>
>> Also generate the address cache if all the addresses have been
>> specified, so that devices hotplugged after libvirtd restart
>> also get theirs assigned.
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=1387666
>> ---
>>  src/conf/domain_addr.c         | 12 ++++++++++++
>>  src/conf/domain_addr.h         |  4 ++++
>>  src/libvirt_private.syms       |  1 +
>>  src/qemu/qemu_domain_address.c | 16 ++++++++++++++--
>>  4 files changed, 31 insertions(+), 2 deletions(-)
>>
>
>ACK for the patch, just validating/checking my assumptions on the commit
>message.
>

Thanks, I have rewritten the commit summary and pushed the series.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161027/03c0a365/attachment-0001.sig>


More information about the libvir-list mailing list