Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-14 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*"): > The current implementation already cleanup the broken state before the > control is passed outside ev_qmp implementation. That result in the Idle > public state. Whenever an internal function throw an

Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-14 Thread Anthony PERARD
On Wed, Nov 14, 2018 at 03:43:41PM +, Ian Jackson wrote: > (I finally remembered to drop the message-id from the CC header...) :), I kept forgeting as well. > Anthony PERARD writes ("Re: [PATCH v6.1 05/11] libxl_qmp: Implementation of > libxl__ev_qmp_*"): > > > But assuming that what you

Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-14 Thread Ian Jackson
Ian Jackson writes ("Re: [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*"): > It is probably easier to introduce the new public Broken state. If you do this you should think about what should happen if your next layer up attempts to reuse a Broken libxl__ev_qmp for an unrelated

Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-14 Thread Ian Jackson
(I finally remembered to drop the message-id from the CC header...) Anthony PERARD writes ("Re: [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*"): > Here is a simpler comment that is true: > !disconnected -> same state > > Even if in this function ev_fd is modified, it needs

Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-14 Thread Anthony PERARD
On Tue, Nov 13, 2018 at 04:10:21PM +, Ian Jackson wrote: > Anthony PERARD writes ("Re: [PATCH v6.1 05/11] libxl_qmp: Implementation of > libxl__ev_qmp_*"): > > On Tue, Nov 13, 2018 at 01:14:30PM +, Ian Jackson wrote: > > But now I realise that `disconnected` would be an illigal state. > >

Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-13 Thread Ian Jackson
Anthony PERARD writes ("Re: [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*"): > On Tue, Nov 13, 2018 at 01:14:30PM +, Ian Jackson wrote: > > This one is probably an asisstant for transitioning between states so > > the pre- and post-conditions may not be pure. Whatever it is

Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-13 Thread Anthony PERARD
On Tue, Nov 13, 2018 at 01:14:30PM +, Ian Jackson wrote: > Anthony PERARD writes ("[PATCH v6.1 05/11] libxl_qmp: Implementation of > libxl__ev_qmp_*"): > ... > > I think this was intended to satisfy my request for comments about > legal states: > > > +/* helpers */ > > + > > +static void

Re: [Xen-devel] [PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*

2018-11-13 Thread Ian Jackson
Anthony PERARD writes ("[PATCH v6.1 05/11] libxl_qmp: Implementation of libxl__ev_qmp_*"): ... I think this was intended to satisfy my request for comments about legal states: > +/* helpers */ > + > +static void qmp_ev_ensure_reading_writing(libxl__gc *gc, libxl__ev_qmp *ev) > +{ > +bool