[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 1/4] io/channel: add qio_channel_get_attached_ai
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH 1/4] io/channel: add qio_channel_get_attached_aio_context() |
Date: |
Mon, 11 Feb 2019 15:22:31 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/11/19 6:55 AM, Vladimir Sementsov-Ogievskiy wrote:
> Expose attached aio context. It will be used in nbd code, to
> understand, in which aio context negotiation should be done.
s/, in/ in/
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> include/io/channel.h | 9 +++++++++
> io/channel.c | 5 +++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/include/io/channel.h b/include/io/channel.h
> index da2f138200..1a1e4a01b0 100644
> --- a/include/io/channel.h
> +++ b/include/io/channel.h
> @@ -718,6 +718,15 @@ GSource *qio_channel_add_watch_source(QIOChannel *ioc,
> void qio_channel_attach_aio_context(QIOChannel *ioc,
> AioContext *ctx);
>
> +/*
> + * qio_channel_get_aio_context
Mismatch between comments...
> + * @ioc: the channel object
> + *
> + * Returns channel AioContext if any attached by
> + * qio_channel_attach_aio_context(), otherwise NULL.
> + */
> +AioContext *qio_channel_get_attached_aio_context(QIOChannel *ioc);
and function name.
Otherwise, looks straightforward, but I'd rather get Daniel's opinion on
whether we need it or if something else is better.
> +AioContext *qio_channel_get_attached_aio_context(QIOChannel *ioc)
> +{
> + return ioc->ctx;
> +}
> +
> void coroutine_fn qio_channel_yield(QIOChannel *ioc,
> GIOCondition condition)
> {
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [PATCH 4/4] block/nbd-client: use non-blocking io channel for nbd negotiation, (continued)
[Qemu-block] [PATCH 2/4] nbd/client: do negotiation in coroutine, Vladimir Sementsov-Ogievskiy, 2019/02/11
[Qemu-block] [PATCH 3/4] nbd: do qemu_coroutine_yield during tls handshake, Vladimir Sementsov-Ogievskiy, 2019/02/11
[Qemu-block] [PATCH 1/4] io/channel: add qio_channel_get_attached_aio_context(), Vladimir Sementsov-Ogievskiy, 2019/02/11