On Fri, Apr 16, 2021 at 11:08:48AM +0300, Vladimir Sementsov-Ogievskiy wrote: > nbd_co_establish_connection_cancel() actually needs only pointer to > NBDConnectThread. So, make it clean. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> > Reviewed-by: Roman Kagan <rvka...@yandex-team.ru> > --- > block/nbd.c | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/block/nbd.c b/block/nbd.c > index dd97ea0916..dab73bdf3b 100644 > --- a/block/nbd.c > +++ b/block/nbd.c
> /* > * nbd_co_establish_connection_cancel > - * Cancel nbd_co_establish_connection asynchronously: it will finish soon, to > - * allow drained section to begin. > + * Cancel nbd_co_establish_connection() asynchronously. Note, that it doesn't > + * stop the thread itself neither close the socket. It just safely wakes > + * nbd_co_establish_connection() sleeping in the yield(). Grammar suggestion: Note that this function neither directly stops the thread nor closes the socket, but rather safely wakes nbd_co_establish_connection() which is sleeping in yield(), triggering subsequent cleanup there. Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org