On Thu, Sep 22, 2022 at 9:49 AM Paolo Bonzini <pbonz...@redhat.com> wrote:
> Callers of coroutine_fn must be coroutine_fn themselves, or the call
> must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
> functions where this holds.
>
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  block.c               |  6 +++---
>  block/block-backend.c | 10 +++++-----
>  block/io.c            | 22 +++++++++++-----------
>  3 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/block.c b/block.c
> index bc85f46eed..5c34ada53f 100644
> --- a/block.c
> +++ b/block.c
> @@ -631,9 +631,9 @@ static int64_t create_file_fallback_truncate(BlockBackend 
> *blk,
>   * Helper function for bdrv_create_file_fallback(): Zero the first
>   * sector to remove any potentially pre-existing image header.
>   */
> -static int create_file_fallback_zero_first_sector(BlockBackend *blk,
> -                                                  int64_t current_size,
> -                                                  Error **errp)
> +static int coroutine_fn create_file_fallback_zero_first_sector(BlockBackend 
> *blk,
> +                                                               int64_t 
> current_size,
> +                                                               Error **errp)

Why mark this coroutine_fn? Maybe the intention was to also replace
the call to blk_pwrite_zeroes() with blk_co_pwrite_zeroes()?

Regardless:

Reviewed-by: Alberto Faria <afa...@redhat.com>


Reply via email to