qemu/nbd
Kevin Wolf d3bd5b9089 nbd: Use low-level QIOChannel API in nbd_read_eof()
Instead of using the convenience wrapper qio_channel_read_all_eof(), use
the lower level QIOChannel API. This means duplicating some code, but
we'll need this because this coroutine yield is special: We want it to
be interruptible so that nbd_client_attach_aio_context() can correctly
reenter the coroutine.

This moves the bdrv_dec/inc_in_flight() pair into nbd_read_eof(), so
that connection_co will always sit in this exact qio_channel_yield()
call when bdrv_drain() returns.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2019-02-25 15:03:19 +01:00
..
client.c nbd: Use low-level QIOChannel API in nbd_read_eof() 2019-02-25 15:03:19 +01:00
common.c nbd: generalize usage of nbd_read 2019-02-04 15:11:27 -06:00
Makefile.objs nbd: Split nbd.c 2016-01-15 18:58:02 +01:00
nbd-internal.h nbd: Move nbd_read_eof() to nbd/client.c 2019-02-25 15:03:19 +01:00
server.c nbd/server: Kill pointless shadowed variable 2019-02-11 14:35:43 -06:00
trace-events nbd/client: Refactor nbd_opt_go() to support NBD_OPT_INFO 2019-01-21 15:49:52 -06:00