Re: [Qemu-devel] [PATCH v3 3/3] nbd-server: Coroutine based negotiation

2016-01-14 Thread Daniel P. Berrange
On Thu, Jan 14, 2016 at 04:41:03PM +0800, Fam Zheng wrote: > Create a coroutine in nbd_client_new, so that nbd_send_negotiate doesn't > need qemu_set_block(). > > Handlers need to be set temporarily for csock fd in case the coroutine > yields during I/O. > > With this, if the other end disappears

[Qemu-devel] [PATCH v3 3/3] nbd-server: Coroutine based negotiation

2016-01-14 Thread Fam Zheng
Create a coroutine in nbd_client_new, so that nbd_send_negotiate doesn't need qemu_set_block(). Handlers need to be set temporarily for csock fd in case the coroutine yields during I/O. With this, if the other end disappears in the middle of the negotiation, we don't block the whole event loop.