Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-23 Thread Paolo Bonzini
Il 23/08/2012 00:40, Anthony Liguori ha scritto: > I don't really like the notion of a "forced eject" where we delete a > device when the guest is using it and not cooperative. I don't see the > benefit at all. > > Forcing detachment of a BlockDriverState from a device followed by EIO > being rep

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-23 Thread liu ping fan
On Thu, Aug 23, 2012 at 12:36 AM, Anthony Liguori wrote: > Paolo Bonzini writes: > >> Il 22/08/2012 05:02, Liu Ping Fan ha scritto: >>> From: Liu Ping Fan >>> >>> Currently, link property's target is only managed by >>> object_set_link_property(). This will raise such issue that when >>> the pro

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Anthony Liguori
Paolo Bonzini writes: > Il 22/08/2012 23:41, Anthony Liguori ha scritto: >> >> (1) should drop the floating reference and the reference held by the >> container. That's what I meant by calling object_unparent in >> qmp_device_del. >> >> (2) should simply remove the device from the bus (further

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Paolo Bonzini
Il 22/08/2012 23:41, Anthony Liguori ha scritto: > > (1) should drop the floating reference and the reference held by the > container. That's what I meant by calling object_unparent in > qmp_device_del. > > (2) should simply remove the device from the bus (further releasing a > reference). > >

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Anthony Liguori
Hi Paolo, Paolo Bonzini writes: > Il 22/08/2012 18:36, Anthony Liguori ha scritto: >> We can fix this by adding an extra reference in add_link but this >> creates yet another problem with hotplug. Specificially, qdev_free() >> asserts that ref > 0 because there is now a reference being held by

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Paolo Bonzini
Il 22/08/2012 18:36, Anthony Liguori ha scritto: > We can fix this by adding an extra reference in add_link but this > creates yet another problem with hotplug. Specificially, qdev_free() > asserts that ref > 0 because there is now a reference being held by the > bus. I think that's correct. Unp

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Andreas Färber
Am 22.08.2012 05:02, schrieb Liu Ping Fan: > From: Liu Ping Fan > > Currently, link property's target is only managed by > object_set_link_property(). This will raise such issue that when > the property is finalized, its target has no opportunity to release. > > Fix this issue by introduce objec

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Anthony Liguori
Paolo Bonzini writes: > Il 22/08/2012 05:02, Liu Ping Fan ha scritto: >> From: Liu Ping Fan >> >> Currently, link property's target is only managed by >> object_set_link_property(). This will raise such issue that when >> the property is finalized, its target has no opportunity to release. >>

Re: [Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-22 Thread Paolo Bonzini
Il 22/08/2012 05:02, Liu Ping Fan ha scritto: > From: Liu Ping Fan > > Currently, link property's target is only managed by > object_set_link_property(). This will raise such issue that when > the property is finalized, its target has no opportunity to release. > > Fix this issue by introduce ob

[Qemu-devel] [PATCH] qom: removal of link property need to release its target

2012-08-21 Thread Liu Ping Fan
From: Liu Ping Fan Currently, link property's target is only managed by object_set_link_property(). This will raise such issue that when the property is finalized, its target has no opportunity to release. Fix this issue by introduce object_finalize_link_property() Signed-off-by: Liu Ping Fan