Max Reitz 78c81a3f10 block/nbd: Fix hang in .bdrv_close()
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 <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200122164532.178040-2-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-02-20 16:43:42 +01:00
..
2019-10-10 10:56:17 +02:00
2019-09-16 14:48:30 +02:00
2019-09-16 14:48:30 +02:00
2019-10-28 12:05:30 +01:00
2019-09-16 14:48:30 +02:00
2020-02-20 16:43:42 +01:00
2019-10-28 11:34:35 +01:00
2019-10-28 14:40:01 +00:00
2018-02-09 05:05:11 +01:00
2020-02-18 11:55:40 +01:00
2019-09-10 08:58:43 +02:00