On 01/04/2012 04:58 PM, Christoph Hellwig wrote:
Btw, what is the plan forward for the block I/O interface? Only qcow2, sheepdog and nbd implement the coroutine interfaces
Actually all formats implement a coroutine interface except raw, qed and vdi (IIRC). But the "minor" formats do not implement scatter/gather I/O, and use a bounce buffer instead.
Among the protocols, only nbd implements coroutines, the others use AIO.
, and none of the hardware emulations calls them directly.
Yes, AIO is often simpler to use for hardware emulation (or anyway it has smaller advantages). But I do expect that SD could easily switch from synchronous to coroutines, for example. Floppy is a mess.
IMO both coroutines and AIO have their uses. Converting qed to coroutines would make sense, but this is much less true for converting raw and even less for rbd or iscsi (the external libraries are callback-based).
On the other hand, changing all formats to support scatter/gather I/O should not be hard, and would enable some nice simplifications in the code. I have enough other cleanups on my plate, though. :/
Paolo