qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 6/7] virtio: fix virtio-blk child refcount in


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 6/7] virtio: fix virtio-blk child refcount in transports
Date: Thu, 29 May 2014 12:18:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Il 29/05/2014 11:11, Peter Crosthwaite ha scritto:
> object_initialize() leaves the object with a refcount of 1.
> object_property_add_child() adds its own reference which is dropped
> again when the property is deleted.
>
> The upshot of this is that we always have a refcount >= 1.  Upon hot
> unplug the virtio-blk child is not finalized!
>
Doesn't this suggest that hot unplug is what's broken? My
understanding (which is fresh and not 100% yet) is the original == 1
refcount should be dropped at object deletion time which is this sense
would be unplug time. This would mean that hot-unplug should
explicitly object_unref the object (should the intention of hot-unplug
be to always finalise the device?).

I think it makes sense either way, as long as it's used consistently.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]