Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-22 Thread Paul Durrant
On 08/03/2021 14:32, Anthony PERARD wrote: From: Anthony PERARD Whenever a Xen block device is detach via xenstore, the image associated with it remained open by the backend QEMU and an error is logged: qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use This happened sin

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-22 Thread Anthony PERARD via
Hi Paul, Stefano, Could one of you could give a Ack to this patch? Thanks, On Mon, Mar 08, 2021 at 02:32:32PM +, Anthony PERARD wrote: > From: Anthony PERARD > > Whenever a Xen block device is detach via xenstore, the image > associated with it remained open by the backend QEMU and an err

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Paolo Bonzini
On 08/03/21 19:14, Anthony PERARD wrote: On Mon, Mar 08, 2021 at 06:37:38PM +0100, Paolo Bonzini wrote: On 08/03/21 18:29, Anthony PERARD wrote: If nothing else works then I guess it's okay, but why can't you do the xen_block_drive_destroy from e.g. an unrealize callback? I'm not sure if that

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD via
On Mon, Mar 08, 2021 at 06:37:38PM +0100, Paolo Bonzini wrote: > On 08/03/21 18:29, Anthony PERARD wrote: > > > If nothing else works then I guess it's okay, but why can't you do the > > > xen_block_drive_destroy from e.g. an unrealize callback? > > > > I'm not sure if that's possible. > > > > xe

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Paolo Bonzini
On 08/03/21 18:29, Anthony PERARD wrote: If nothing else works then I guess it's okay, but why can't you do the xen_block_drive_destroy from e.g. an unrealize callback? I'm not sure if that's possible. xen_block_device_create/xen_block_device_destroy() is supposed to be equivalent to do those

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD via
On Mon, Mar 08, 2021 at 03:38:49PM +0100, Paolo Bonzini wrote: > On 08/03/21 15:32, Anthony PERARD wrote: > > From: Anthony PERARD > > > > Whenever a Xen block device is detach via xenstore, the image > > associated with it remained open by the backend QEMU and an error is > > logged: > > qe

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Paolo Bonzini
On 08/03/21 15:32, Anthony PERARD wrote: From: Anthony PERARD Whenever a Xen block device is detach via xenstore, the image associated with it remained open by the backend QEMU and an error is logged: qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use This happened since

[PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD via
From: Anthony PERARD Whenever a Xen block device is detach via xenstore, the image associated with it remained open by the backend QEMU and an error is logged: qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use This happened since object_unparent() doesn't immediately frees