parallels: add missing coroutine_fn annotations
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Sep 2022 08:49:11 +0000 (10:49 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 7 Oct 2022 10:11:40 +0000 (12:11 +0200)
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.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-14-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/parallels.c

index a229c06f25fdeb03bf6b8b7ececa70da9da66160..c1523e7dabdb25d0291e163f82843d9293ed328f 100644 (file)
@@ -165,8 +165,9 @@ static int64_t block_status(BDRVParallelsState *s, int64_t sector_num,
     return start_off;
 }
 
-static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num,
-                                 int nb_sectors, int *pnum)
+static coroutine_fn int64_t allocate_clusters(BlockDriverState *bs,
+                                              int64_t sector_num,
+                                              int nb_sectors, int *pnum)
 {
     int ret = 0;
     BDRVParallelsState *s = bs->opaque;