Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-23 Thread Wei Liu
On Fri, Feb 09, 2018 at 12:22:13AM +0100, Marek Marczykowski-Górecki wrote: > Backend domain may be independently destroyed - there is no > synchronization of libxl structures (including /libxl tree) elsewhere. > Backend might also remove the device info from its backend xenstore > subtree on its

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Roger Pau Monné
On Fri, Feb 09, 2018 at 05:32:47PM +0100, Marek Marczykowski-Górecki wrote: > On Fri, Feb 09, 2018 at 03:33:40PM +, Roger Pau Monné wrote: > > I'm sorry, I'm a little foggy today. Does this mean the call to > > libxl__xs_path_cleanup is simply not needed in > >

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Marek Marczykowski-Górecki
On Fri, Feb 09, 2018 at 03:33:40PM +, Roger Pau Monné wrote: > I'm sorry, I'm a little foggy today. Does this mean the call to > libxl__xs_path_cleanup is simply not needed in > libxl__initiate_device_generic_remove? It is, it's an alternative to setting be/state=XenbusStateClosing, when

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Roger Pau Monné
On Fri, Feb 09, 2018 at 04:11:06PM +0100, Marek Marczykowski-Górecki wrote: > On Fri, Feb 09, 2018 at 02:39:08PM +, Roger Pau Monné wrote: > > On Fri, Feb 09, 2018 at 02:08:33PM +0100, Marek Marczykowski-Górecki wrote: > > > On Fri, Feb 09, 2018 at 12:10:39PM +, Roger Pau Monné wrote: > >

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Marek Marczykowski-Górecki
On Fri, Feb 09, 2018 at 02:39:08PM +, Roger Pau Monné wrote: > On Fri, Feb 09, 2018 at 02:08:33PM +0100, Marek Marczykowski-Górecki wrote: > > On Fri, Feb 09, 2018 at 12:10:39PM +, Roger Pau Monné wrote: > > > On Fri, Feb 09, 2018 at 12:41:58PM +0100, Marek Marczykowski-Górecki > > >

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Roger Pau Monné
On Fri, Feb 09, 2018 at 02:08:33PM +0100, Marek Marczykowski-Górecki wrote: > On Fri, Feb 09, 2018 at 12:10:39PM +, Roger Pau Monné wrote: > > On Fri, Feb 09, 2018 at 12:41:58PM +0100, Marek Marczykowski-Górecki wrote: > > > On Fri, Feb 09, 2018 at 11:27:04AM +, Roger Pau Monné wrote: > >

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Marek Marczykowski-Górecki
On Fri, Feb 09, 2018 at 12:10:39PM +, Roger Pau Monné wrote: > On Fri, Feb 09, 2018 at 12:41:58PM +0100, Marek Marczykowski-Górecki wrote: > > On Fri, Feb 09, 2018 at 11:27:04AM +, Roger Pau Monné wrote: > > > I'm also wondering, if you jump to 'out' here, you avoid the call to > > >

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Roger Pau Monné
On Fri, Feb 09, 2018 at 12:41:58PM +0100, Marek Marczykowski-Górecki wrote: > On Fri, Feb 09, 2018 at 11:27:04AM +, Roger Pau Monné wrote: > > I'm also wondering, if you jump to 'out' here, you avoid the call to > > libxl__xs_transaction_commit and instead end up calling > >

Re: [Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-09 Thread Marek Marczykowski-Górecki
On Fri, Feb 09, 2018 at 11:27:04AM +, Roger Pau Monné wrote: > On Fri, Feb 09, 2018 at 12:22:13AM +0100, Marek Marczykowski-Górecki wrote: > > Backend domain may be independently destroyed - there is no > > synchronization of libxl structures (including /libxl tree) elsewhere. > > Backend

[Xen-devel] [PATCH] libxl: do not fail device removal if backend domain is gone

2018-02-08 Thread Marek Marczykowski-Górecki
Backend domain may be independently destroyed - there is no synchronization of libxl structures (including /libxl tree) elsewhere. Backend might also remove the device info from its backend xenstore subtree on its own. If such situation is detected, do not fail the removal, but finish the cleanup