Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2023-01-17 Thread Kevin Wolf
Am 17.01.2023 um 16:44 hat Kevin Wolf geschrieben: > Am 15.12.2022 um 14:02 hat Paolo Bonzini geschrieben: > > blkdebug events can be called from either non-coroutine or coroutine > > contexts. However, suspend actions only make sense from within > > a coroutine. Currently, using those action wou

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2023-01-17 Thread Kevin Wolf
Am 15.12.2022 um 14:02 hat Paolo Bonzini geschrieben: > blkdebug events can be called from either non-coroutine or coroutine > contexts. However, suspend actions only make sense from within > a coroutine. Currently, using those action would lead to an abort() in > qemu_coroutine_yield() ("Co-rout

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-12-15 Thread Kevin Wolf
Am 15.12.2022 um 14:02 hat Paolo Bonzini geschrieben: > blkdebug events can be called from either non-coroutine or coroutine > contexts. However, suspend actions only make sense from within > a coroutine. Currently, using those action would lead to an abort() in > qemu_coroutine_yield() ("Co-rout

[PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-12-15 Thread Paolo Bonzini
blkdebug events can be called from either non-coroutine or coroutine contexts. However, suspend actions only make sense from within a coroutine. Currently, using those action would lead to an abort() in qemu_coroutine_yield() ("Co-routine is yielding to no one"). Catch them and print an error in

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-10-13 Thread Paolo Bonzini
On 10/13/22 15:28, Markus Armbruster wrote: Let's have another look at the remaining patch hunk: @@ -858,7 +864,12 @@ static void blkdebug_debug_event(BlockDriverState *bs, BlkdebugEvent event) } while (actions_count[ACTION_SUSPEND] > 0) { -qemu_coroutine_

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-10-13 Thread Paolo Bonzini
On 10/13/22 12:56, Markus Armbruster wrote: rule_check() is called from blkdebug_co_preadv(), blkdebug_co_pwritev(), blkdebug_co_pwrite_zeroes(), blkdebug_co_pdiscard(), blkdebug_co_block_status() (all marked coroutine_fn), and blkdebug_co_flush() (which looks like it should be marked coroutine_f

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-10-13 Thread Markus Armbruster
Paolo Bonzini writes: > On 10/13/22 12:56, Markus Armbruster wrote: >> rule_check() is called from blkdebug_co_preadv(), blkdebug_co_pwritev(), >> blkdebug_co_pwrite_zeroes(), blkdebug_co_pdiscard(), >> blkdebug_co_block_status() (all marked coroutine_fn), and >> blkdebug_co_flush() (which looks

Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-10-13 Thread Markus Armbruster
Paolo Bonzini writes: > blkdebug events can be called from either non-coroutine or coroutine > contexts. However, some actions (specifically suspend actions and > errors reported with immediately=off) only make sense from within > a coroutine. > > Currently, using those action would lead to an a

[PATCH] blkdebug: ignore invalid rules in non-coroutine context

2022-10-13 Thread Paolo Bonzini
blkdebug events can be called from either non-coroutine or coroutine contexts. However, some actions (specifically suspend actions and errors reported with immediately=off) only make sense from within a coroutine. Currently, using those action would lead to an abort() in qemu_coroutine_yield() ("