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

Re: [Xen-devel] [PATCH 27/29] [VERY RFC] tools/libxl: Support restoring legacy streams



On Wed, 2014-09-10 at 18:11 +0100, Andrew Cooper wrote:
> This WorksForMe in the success case, but the error handling is certainly 
> lacking.
> 
> Specifically, the conversion scripts output fd can't be closed until the v2
> read loop has exited (cleanly or otherwise), without risking a close()/open()
> race silently replacing the fd behind the loops back.
> 
> However, it can't be closed when the read loop exits, as the conversion script
> child might still be alive, and would prefer terminating cleaning than failing
> with a bad FD.
> 
> Obviously, having one error handler block for the success/failure of the other
> side is a no-go, and would still involve a preselecting which was expected to
> exit first.
> 
> Does anyone have any clever ideas of how to asynchronously collect the events
> "the conversion script has exited", "the save helper has exited" and "the v2
> read loop has finished" given the available infrastructure, to kick of a
> combined cleanup of all 3?
> 
> (I also need to fix the conversion script info/error logging, but that is a
> distinctly more minor problem.)

This is probably one for Ian when he gets back, but a state machine
which is cranked in response to the callbacks from the various
completion events might be one way to approach this.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.