[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 10/32] block/nbd: simplify waking of nbd_co_establish_conn
From: |
Eric Blake |
Subject: |
Re: [PATCH v4 10/32] block/nbd: simplify waking of nbd_co_establish_connection() |
Date: |
Fri, 11 Jun 2021 09:06:48 -0500 |
User-agent: |
NeoMutt/20210205 |
On Thu, Jun 10, 2021 at 01:07:40PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Instead of managing connect_bh, bh_ctx, and wait_connect fields, we
> can use a single link to the waiting coroutine with proper mutex
> protection.
>
...
> Also, this commit reduces the dependence of
> nbd_co_establish_connection() on the internals of bs (we now use a
> generic pointer to the coroutine, instead of direct use of
> s->connection_co). This is a step towards splitting the connection
> API out of nbd.c.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> block/nbd.c | 55 +++++++++++++++--------------------------------------
> 1 file changed, 15 insertions(+), 40 deletions(-)
>
Reviewied-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH v4 02/32] block/nbd: fix channel object leak, (continued)
- [PATCH v4 02/32] block/nbd: fix channel object leak, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 06/32] block/nbd: call socket_address_parse_named_fd() in advance, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 07/32] block/nbd: ensure ->connection_thread is always valid, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 08/32] block/nbd: nbd_client_handshake(): fix leak of s->ioc, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 03/32] block/nbd: fix how state is cleared on nbd_open() failure paths, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 09/32] block/nbd: BDRVNBDState: drop unused connect_err and connect_status, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 04/32] block/nbd: connect_thread_func(): do qio_channel_set_delay(false), Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 10/32] block/nbd: simplify waking of nbd_co_establish_connection(), Vladimir Sementsov-Ogievskiy, 2021/06/10
- Re: [PATCH v4 10/32] block/nbd: simplify waking of nbd_co_establish_connection(),
Eric Blake <=
- [PATCH v4 17/32] nbd: move connection code from block/nbd to nbd/client-connection, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 12/32] block/nbd: bs-independent interface for nbd_co_establish_connection(), Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 18/32] nbd/client-connection: use QEMU_LOCK_GUARD, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 19/32] nbd/client-connection: add possibility of negotiation, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 11/32] block/nbd: drop thr->state, Vladimir Sementsov-Ogievskiy, 2021/06/10
- [PATCH v4 05/32] qemu-sockets: introduce socket_address_parse_named_fd(), Vladimir Sementsov-Ogievskiy, 2021/06/10