qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]