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

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



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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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