[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/26] block: remove incorrect coroutine_fn annotations
From: |
Eric Blake |
Subject: |
Re: [PATCH 01/26] block: remove incorrect coroutine_fn annotations |
Date: |
Tue, 19 Apr 2022 12:57:54 -0500 |
User-agent: |
NeoMutt/20211029-35-db88c3 |
On Fri, Apr 15, 2022 at 03:18:35PM +0200, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Might be nice to document in the commit message why the annotation was
incorrect, so someone stumbling across this commit in a bisect but
otherwise unfamiliar with the rules of when to annotate doesn't get
lost. If I understand right, the argument is more-or-less:
This function defers to the generated blk_do_pwritev_part, which is
safe to call outside coroutine context.
But although the commit message is weak, the change itself appears
correct from what I have observed with the annotation in other places.
Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
> block/block-backend.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/block/block-backend.c b/block/block-backend.c
> index e0e1aff4b1..fedf2eca83 100644
> --- a/block/block-backend.c
> +++ b/block/block-backend.c
> @@ -1391,10 +1391,10 @@ int coroutine_fn blk_co_pwritev(BlockBackend *blk,
> int64_t offset,
> return blk_co_pwritev_part(blk, offset, bytes, qiov, 0, flags);
> }
>
> -static int coroutine_fn blk_pwritev_part(BlockBackend *blk, int64_t offset,
> - int64_t bytes,
> - QEMUIOVector *qiov, size_t
> qiov_offset,
> - BdrvRequestFlags flags)
> +static int blk_pwritev_part(BlockBackend *blk, int64_t offset,
> + int64_t bytes,
> + QEMUIOVector *qiov, size_t qiov_offset,
> + BdrvRequestFlags flags)
> {
> int ret;
>
> --
> 2.35.1
>
>
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[PATCH 04/26] coroutine: remove incorrect coroutine_fn annotations, Paolo Bonzini, 2022/04/15
[PATCH 03/26] nbd: remove incorrect coroutine_fn annotations, Paolo Bonzini, 2022/04/15