Re: [Qemu-devel] [PATCH 3/3] nbd: do not block on partial reply header reads

2017-01-16 Thread Stefan Hajnoczi
On Fri, Dec 23, 2016 at 07:26:41PM +0100, Paolo Bonzini wrote: > @@ -65,54 +67,34 @@ static void nbd_teardown_connection(BlockDriverState *bs) > client->ioc = NULL; > } > > -static void nbd_reply_ready(void *opaque) > +static void nbd_read_reply_entry(void *opaque) Please use the coroutine

Re: [Qemu-devel] [PATCH 3/3] nbd: do not block on partial reply header reads

2017-01-04 Thread Eric Blake
On 12/23/2016 12:26 PM, Paolo Bonzini wrote: > Read the replies from a coroutine. qio_channel_yield is used so that > the right coroutine is restarted automatically, eliminating the need > for send_coroutine in NBDClientSession. > > Signed-off-by: Paolo Bonzini > --- > block/nbd-client.c | 108

[Qemu-devel] [PATCH 3/3] nbd: do not block on partial reply header reads

2016-12-23 Thread Paolo Bonzini
Read the replies from a coroutine. qio_channel_yield is used so that the right coroutine is restarted automatically, eliminating the need for send_coroutine in NBDClientSession. Signed-off-by: Paolo Bonzini --- block/nbd-client.c | 108 + 1 fi