On Tue, Jan 03, 2012 at 08:16:55AM +0000, Stefan Hajnoczi wrote: > On Mon, Jan 02, 2012 at 04:39:59PM +0100, Christoph Hellwig wrote: > > I've tried to understand how the recursive calling happens, but > > unfortunately > > the whole coroutine code lacks any sort of documentation how it should > > behave or what it asserts about the callers. > > There is documentation on the public coroutine functions, see > qemu-coroutine.h.
Ok, I was looking in the source files and the documentation directory only as that is where I expected the documentation to sit. Btw, what is the plan forward for the block I/O interface? Only qcow2, sheepdog and nbd implement the coroutine interfaces, and none of the hardware emulations calls them directly. Also at least for interfaces like the librbd callbacks coroutines don't even seem to be that useful.