[libvirt] [PATCH 2/2] qemu: Update next usable PCI slot on domain reconnect

Eric Blake eblake at redhat.com
Tue Aug 17 15:11:30 UTC 2010


On 08/16/2010 11:08 AM, Jiri Denemark wrote:
> +void
> +qemuDomainPCIAddressSetUpdate(qemuDomainPCIAddressSetPtr addrs)
> +{
> +
> +    if (!addrs)
> +        return;
> +
> +    virHashForEach(addrs->used, qemuDomainPCIAddressSetUpdateIter, addrs);

Does virHashForEach visit the hash table in the same order in which
entries were inserted, or does it visit in random order based on how the
hashes map to buckets?  If the latter, then how are you guaranteeing
that you are setting nextslot to the right value, if you don't know if
you are visiting the correct table entry last?

> +
> +    VIR_DEBUG("nextslot updated to %d", addrs->nextslot);
> +}
> +

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100817/48e31a14/attachment-0001.sig>


More information about the libvir-list mailing list