[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context
From: |
Kevin Wolf |
Subject: |
Re: [PATCH] blkdebug: ignore invalid rules in non-coroutine context |
Date: |
Thu, 15 Dec 2022 14:44:42 +0100 |
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-routine is yielding to no one"). Catch them
> and print an error instead.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block.c | 2 +-
> block/blkdebug.c | 10 ++++++++--
> include/block/block-io.h | 2 +-
> include/block/block_int-common.h | 3 ++-
> 4 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/block.c b/block.c
> index 3f2bd128570e..49c66475c73e 100644
> --- a/block.c
> +++ b/block.c
> @@ -6334,7 +6334,7 @@ BlockStatsSpecific
> *bdrv_get_specific_stats(BlockDriverState *bs)
> return drv->bdrv_get_specific_stats(bs);
> }
>
> -void bdrv_debug_event(BlockDriverState *bs, BlkdebugEvent event)
> +void coroutine_mixed_fn bdrv_debug_event(BlockDriverState *bs, BlkdebugEvent
> event)
coroutine_mixed_fn isn't a thing. I assume this depends on some patch
you haven't sent yet?
Kevin