vmdk: add missing coroutine_fn annotations

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-21-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Paolo Bonzini 2022-09-22 10:49:18 +02:00 committed by Kevin Wolf
parent 4cb1bc3464
commit b4df990377

View File

@ -1787,7 +1787,8 @@ static int coroutine_fn vmdk_co_block_status(BlockDriverState *bs,
return ret;
}
static int vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset,
static int coroutine_fn
vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset,
int64_t offset_in_cluster, QEMUIOVector *qiov,
uint64_t qiov_offset, uint64_t n_bytes,
uint64_t offset)
@ -1868,7 +1869,8 @@ static int vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset,
return ret;
}
static int vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset,
static int coroutine_fn
vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset,
int64_t offset_in_cluster, QEMUIOVector *qiov,
int bytes)
{
@ -2015,7 +2017,7 @@ fail:
*
* Returns: error code with 0 for success.
*/
static int vmdk_pwritev(BlockDriverState *bs, uint64_t offset,
static int coroutine_fn vmdk_pwritev(BlockDriverState *bs, uint64_t offset,
uint64_t bytes, QEMUIOVector *qiov,
bool zeroed, bool zero_dry_run)
{