On 3/15/21 1:06 AM, Roman Kagan wrote:
> The reconnection logic doesn't need to stop while in a drained section.
> Moreover it has to be active during the drained section, as the requests
> that were caught in-flight with the connection to the server broken can
> only usefully get drained if the connection is restored. Otherwise such
> requests can only either stall resulting in a deadlock (before
> 8c517de24a), or be aborted defeating the purpose of the reconnection
> machinery (after 8c517de24a).
>
> This series aims to just stop messing with the drained section in the
> reconnection code.
>
> While doing so it undoes the effect of 5ad81b4946 ("nbd: Restrict
> connection_co reentrance"); as I've missed the point of that commit I'd
> appreciate more scrutiny in this area.
Soft freeze is today. I'm leaning towards declaring this series as a
bug fix (and so give it some more soak time to get right, but still okay
for -rc1) rather than a feature addition (and therefore would need to be
in a pull request today). Speak up now if this characterization is off
base.
>
> Roman Kagan (7):
> block/nbd: avoid touching freed connect_thread
> block/nbd: use uniformly nbd_client_connecting_wait
> block/nbd: assert attach/detach runs in the proper context
> block/nbd: transfer reconnection stuff across aio_context switch
> block/nbd: better document a case in nbd_co_establish_connection
> block/nbd: decouple reconnect from drain
> block/nbd: stop manipulating in_flight counter
>
> block/nbd.c | 191 +++++++++++++++++++++++----------------------------
> nbd/client.c | 2 -
> 2 files changed, 86 insertions(+), 107 deletions(-)
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org