Re: bdrv_drained_begin deadlock with io-threads

2020-04-03 Thread Thomas Lamprecht
On 4/2/20 7:10 PM, Kevin Wolf wrote: > Am 02.04.2020 um 18:47 hat Kevin Wolf geschrieben: >> So I think this is the bug: Calling blk_wait_while_drained() from >> anywhere between blk_inc_in_flight() and blk_dec_in_flight() is wrong >> because it will deadlock the drain operation. >> >> blk_aio_read

Re: [RFC PATCH 2/3] block: Allow bdrv_run_co() from different AioContext

2020-05-12 Thread Thomas Lamprecht
On 5/12/20 4:43 PM, Kevin Wolf wrote: > Coroutine functions that are entered through bdrv_run_co() are already > safe to call from synchronous code in a different AioContext because > bdrv_coroutine_enter() will schedule them in the context of the node. > > However, the coroutine fastpath still re

Re: [RFC PATCH 0/3] block: Synchronous bdrv_*() from coroutine in different AioContext

2020-05-14 Thread Thomas Lamprecht
On 5/12/20 4:43 PM, Kevin Wolf wrote: > Stefan (Reiter), after looking a bit closer at this, I think there is no > bug in QEMU, but the bug is in your coroutine code that calls block > layer functions without moving into the right AioContext first. I've > written this series anyway as it potentiall