[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/12] nbd: Use low-level QIOChannel API in nbd_
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 06/12] nbd: Use low-level QIOChannel API in nbd_read_eof() |
Date: |
Mon, 18 Feb 2019 14:48:10 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
On 2/18/19 10:18 AM, Kevin Wolf wrote:
> 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 <address@hidden>
> ---
> include/block/nbd.h | 4 ++--
> block/nbd-client.c | 8 +-------
> nbd/client.c | 46 ++++++++++++++++++++++++++++++++++++---------
> 3 files changed, 40 insertions(+), 18 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- [Qemu-devel] [PATCH 03/12] nbd: Restrict connection_co reentrance, (continued)
- [Qemu-devel] [PATCH 03/12] nbd: Restrict connection_co reentrance, Kevin Wolf, 2019/02/18
- [Qemu-devel] [PATCH 11/12] block: Use normal drain for bdrv_set_aio_context(), Kevin Wolf, 2019/02/18
- [Qemu-devel] [PATCH 12/12] aio-posix: Assert that aio_poll() is always called in home thread, Kevin Wolf, 2019/02/18
- [Qemu-devel] [PATCH 05/12] nbd: Move nbd_read_eof() to nbd/client.c, Kevin Wolf, 2019/02/18
- [Qemu-devel] [PATCH 06/12] nbd: Use low-level QIOChannel API in nbd_read_eof(), Kevin Wolf, 2019/02/18
- Re: [Qemu-devel] [PATCH 06/12] nbd: Use low-level QIOChannel API in nbd_read_eof(),
Eric Blake <=
- [Qemu-devel] [PATCH 04/12] io: Make qio_channel_yield() interruptible, Kevin Wolf, 2019/02/18