[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 7/7] block/nbd: stop manipulating in_flight counter
From: |
Roman Kagan |
Subject: |
Re: [PATCH 7/7] block/nbd: stop manipulating in_flight counter |
Date: |
Tue, 16 Mar 2021 19:08:13 +0300 |
On Mon, Mar 15, 2021 at 11:15:44PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> 15.03.2021 09:06, Roman Kagan wrote:
> > As the reconnect logic no longer interferes with drained sections, it
> > appears unnecessary to explicitly manipulate the in_flight counter.
> >
> > Fixes: 5ad81b4946 ("nbd: Restrict connection_co reentrance")
>
> And here you actually allow qemu_aio_coroutine_enter() call in
> nbd_client_attach_aio_context_bh() to enter connection_co in any yield
> point which is possible during drained section. The analysis should be
> done to be sure that all these yield points are safe for reentering by
> external qemu_aio_coroutine_enter(). (By external I mean not by the
> actual enter() we are waiting for at the yield() point. For example
> qemu_channel_yield() supports reentering.. And therefore (as I
> understand after fast looking through) nbd_read() should support
> reentering too..
I'll do a more thorough analysis of how safe it is.
FWIW this hasn't triggered any test failures yet, but that assert in
patch 3 didn't ever go off either so I'm not sure I can trust the tests
on this.
Thanks,
Roman.
- [PATCH 5/7] block/nbd: better document a case in nbd_co_establish_connection, (continued)
- [PATCH 5/7] block/nbd: better document a case in nbd_co_establish_connection, Roman Kagan, 2021/03/15
- [PATCH 3/7] block/nbd: assert attach/detach runs in the proper context, Roman Kagan, 2021/03/15
- [PATCH 4/7] block/nbd: transfer reconnection stuff across aio_context switch, Roman Kagan, 2021/03/15
- [PATCH 1/7] block/nbd: avoid touching freed connect_thread, Roman Kagan, 2021/03/15
- [PATCH 7/7] block/nbd: stop manipulating in_flight counter, Roman Kagan, 2021/03/15
[PATCH 2/7] block/nbd: use uniformly nbd_client_connecting_wait, Roman Kagan, 2021/03/15
Re: [PATCH 0/7] block/nbd: decouple reconnect from drain, Vladimir Sementsov-Ogievskiy, 2021/03/15
Re: [PATCH 0/7] block/nbd: decouple reconnect from drain, Eric Blake, 2021/03/16
Re: [PATCH 0/7] block/nbd: decouple reconnect from drain, Vladimir Sementsov-Ogievskiy, 2021/03/17