On 1/22/20 10:45 AM, Max Reitz wrote:
When nbd_close() is called from a coroutine, the connection_co never
gets to run, and thus nbd_teardown_connection() hangs.

This is because aio_co_enter() only puts the connection_co into the main
coroutine's wake-up queue, so this main coroutine needs to yield and
wait for connection_co to terminate.

Suggested-by: Kevin Wolf <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
---
  block/nbd.c | 14 +++++++++++++-
  1 file changed, 13 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <[email protected]>

I'm assuming it is better to take the entire series through somewhere other than my NBD tree, since the remaining patches touch more than NBD?

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to