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

Re: [libvirt] [PATCH] qemu: Rollback on used USB devices



On 05/16/2012 08:53 AM, Michal Privoznik wrote:
> One of our latest USB device handling patches
> 05abd1507d66aabb6cad12eeafeb4c4d1911c585 introduced a regression.
> That is, we first create a temporary list of all USB devices that
> are to be used by domain just starting up. Then we iterate over and
> check if a device from the list is in the global list of currently
> assigned devices (activeUsbHostdevs). If not, we add it there and
> continue with next iteration then. But if a device from temporary
> list is either taken already or adding to the activeUsbHostdevs fails,
> we remove all devices in temp list from the activeUsbHostdevs list.
> Therefore, if a device is already taken we remove it from
> activeUsbHostdevs even if we should not. Thus, next time we allow
> the device to be assigned to another domain.

My bad for not reviewing the original patch in context in the first
place, or I might have questioned the loop consolidation.

> ---
>  src/qemu/qemu_hostdev.c |   28 ++++++++++++----------------
>  1 files changed, 12 insertions(+), 16 deletions(-)

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
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]