Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-17 Thread Emanuele Giuseppe Esposito
On 14/02/2022 12:57, Paolo Bonzini wrote: > On 2/14/22 11:27, Emanuele Giuseppe Esposito wrote: >> Anyways, I think that in addition to the fix in this patch, we should >> also fix bdrv_parent_drained_begin_single(poll=true) in >> bdrv_replace_child_noperm, with something similar to what is done

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-14 Thread Kevin Wolf
Am 14.02.2022 um 11:27 hat Emanuele Giuseppe Esposito geschrieben: > > > On 11/02/2022 12:54, Kevin Wolf wrote: > > Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: > >> Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() > >> is not a good idea: the callback

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-14 Thread Paolo Bonzini
On 2/14/22 11:27, Emanuele Giuseppe Esposito wrote: Anyways, I think that in addition to the fix in this patch, we should also fix bdrv_parent_drained_begin_single(poll=true) in bdrv_replace_child_noperm, with something similar to what is done in bdrv_co_yield_to_drain? ie if we are in coroutine,

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-14 Thread Emanuele Giuseppe Esposito
On 11/02/2022 12:54, Kevin Wolf wrote: > Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: >> Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() >> is not a good idea: the callback might be called when running >> a drain in a coroutine, and bdrv_drained_begin

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-11 Thread Kevin Wolf
Am 08.02.2022 um 16:36 hat Emanuele Giuseppe Esposito geschrieben: > Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() > is not a good idea: the callback might be called when running > a drain in a coroutine, and bdrv_drained_begin_poll() does not > handle that case, resulting

Re: [PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-10 Thread Stefan Hajnoczi
On Tue, Feb 08, 2022 at 10:36:50AM -0500, Emanuele Giuseppe Esposito wrote: > Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() > is not a good idea: the callback might be called when running > a drain in a coroutine, and bdrv_drained_begin_poll() does not > handle that case, r

[PATCH 1/6] block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine

2022-02-08 Thread Emanuele Giuseppe Esposito
Using bdrv_do_drained_begin_quiesce() in bdrv_child_cb_drained_begin() is not a good idea: the callback might be called when running a drain in a coroutine, and bdrv_drained_begin_poll() does not handle that case, resulting in assertion failure. Instead, bdrv_do_drained_begin with no recursion and