Re: [Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-12 Thread Kevin Wolf
Am 12.07.2019 um 13:44 hat Max Reitz geschrieben: > On 12.07.19 13:23, Kevin Wolf wrote: > > Am 12.07.2019 um 13:09 hat Max Reitz geschrieben: > >> On 12.07.19 13:01, Kevin Wolf wrote: > >>> Am 12.07.2019 um 12:47 hat Max Reitz geschrieben: > On 12.07.19 11:24, Kevin Wolf wrote: > > Am

Re: [Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-12 Thread Max Reitz
On 12.07.19 13:23, Kevin Wolf wrote: > Am 12.07.2019 um 13:09 hat Max Reitz geschrieben: >> On 12.07.19 13:01, Kevin Wolf wrote: >>> Am 12.07.2019 um 12:47 hat Max Reitz geschrieben: On 12.07.19 11:24, Kevin Wolf wrote: > Am 11.07.2019 um 21:58 hat Max Reitz geschrieben: >> When

Re: [Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-12 Thread Kevin Wolf
Am 12.07.2019 um 13:09 hat Max Reitz geschrieben: > On 12.07.19 13:01, Kevin Wolf wrote: > > Am 12.07.2019 um 12:47 hat Max Reitz geschrieben: > >> On 12.07.19 11:24, Kevin Wolf wrote: > >>> Am 11.07.2019 um 21:58 hat Max Reitz geschrieben: > When nbd_close() is called from a coroutine, the

Re: [Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-12 Thread Max Reitz
On 12.07.19 13:01, Kevin Wolf wrote: > Am 12.07.2019 um 12:47 hat Max Reitz geschrieben: >> On 12.07.19 11:24, Kevin Wolf wrote: >>> Am 11.07.2019 um 21:58 hat Max Reitz geschrieben: When nbd_close() is called from a coroutine, the connection_co never gets to run, and thus

Re: [Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-12 Thread Kevin Wolf
Am 12.07.2019 um 12:47 hat Max Reitz geschrieben: > On 12.07.19 11:24, Kevin Wolf wrote: > > Am 11.07.2019 um 21:58 hat Max Reitz geschrieben: > >> When nbd_close() is called from a coroutine, the connection_co never > >> gets to run, and thus nbd_teardown_connection() hangs. > >> > >> This is

Re: [Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-12 Thread Max Reitz
On 12.07.19 11:24, Kevin Wolf wrote: > Am 11.07.2019 um 21:58 hat Max Reitz geschrieben: >> 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

Re: [Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-12 Thread Kevin Wolf
Am 11.07.2019 um 21:58 hat Max Reitz geschrieben: > 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

[Qemu-block] [RFC 1/5] block/nbd: Fix hang in .bdrv_close()

2019-07-11 Thread Max Reitz
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 reschedule itself to let the