[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/50] vmdk: add missing coroutine_fn annotations
From: |
Kevin Wolf |
Subject: |
[PULL 21/50] vmdk: add missing coroutine_fn annotations |
Date: |
Fri, 7 Oct 2022 12:47:23 +0200 |
From: Paolo Bonzini <pbonzini@redhat.com>
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>
---
block/vmdk.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index fe07a54866..f7d8856dfb 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1787,10 +1787,11 @@ static int coroutine_fn
vmdk_co_block_status(BlockDriverState *bs,
return ret;
}
-static int 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)
+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)
{
int ret;
VmdkGrainMarker *data = NULL;
@@ -1868,9 +1869,10 @@ static int vmdk_write_extent(VmdkExtent *extent, int64_t
cluster_offset,
return ret;
}
-static int vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset,
- int64_t offset_in_cluster, QEMUIOVector *qiov,
- int bytes)
+static int coroutine_fn
+vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset,
+ int64_t offset_in_cluster, QEMUIOVector *qiov,
+ int bytes)
{
int ret;
int cluster_bytes, buf_bytes;
@@ -2015,9 +2017,9 @@ fail:
*
* Returns: error code with 0 for success.
*/
-static int vmdk_pwritev(BlockDriverState *bs, uint64_t offset,
- uint64_t bytes, QEMUIOVector *qiov,
- bool zeroed, bool zero_dry_run)
+static int coroutine_fn vmdk_pwritev(BlockDriverState *bs, uint64_t offset,
+ uint64_t bytes, QEMUIOVector *qiov,
+ bool zeroed, bool zero_dry_run)
{
BDRVVmdkState *s = bs->opaque;
VmdkExtent *extent = NULL;
--
2.37.3
- [PULL 28/50] quorum: Remove unnecessary forward declaration, (continued)
- [PULL 28/50] quorum: Remove unnecessary forward declaration, Kevin Wolf, 2022/10/07
- [PULL 30/50] job.h: categorize fields in struct Job, Kevin Wolf, 2022/10/07
- [PULL 10/50] iscsi: add missing coroutine_fn annotations, Kevin Wolf, 2022/10/07
- [PULL 03/50] block/nvme: separate nvme_get_free_req cases for coroutine/non-coroutine context, Kevin Wolf, 2022/10/07
- [PULL 32/50] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED, Kevin Wolf, 2022/10/07
- [PULL 36/50] jobs: add job lock in find_* functions, Kevin Wolf, 2022/10/07
- [PULL 33/50] job.c: add job_lock/unlock while keeping job.h intact, Kevin Wolf, 2022/10/07
- [PULL 14/50] parallels: add missing coroutine_fn annotations, Kevin Wolf, 2022/10/07
- [PULL 15/50] qcow2: add missing coroutine_fn annotations, Kevin Wolf, 2022/10/07
- [PULL 18/50] qed: add missing coroutine_fn annotations, Kevin Wolf, 2022/10/07
- [PULL 21/50] vmdk: add missing coroutine_fn annotations,
Kevin Wolf <=
- [PULL 22/50] job: add missing coroutine_fn annotations, Kevin Wolf, 2022/10/07
- [PULL 40/50] job: detect change of aiocontext within job coroutine, Kevin Wolf, 2022/10/07
- [PULL 31/50] job.c: API functions not used outside should be static, Kevin Wolf, 2022/10/07
- [PULL 38/50] block/mirror.c: use of job helpers in drivers, Kevin Wolf, 2022/10/07
- [PULL 35/50] blockjob: introduce block_job _locked() APIs, Kevin Wolf, 2022/10/07
- [PULL 39/50] jobs: group together API calls under the same job lock, Kevin Wolf, 2022/10/07
- [PULL 37/50] jobs: use job locks also in the unit tests, Kevin Wolf, 2022/10/07
- [PULL 43/50] blockjob: rename notifier callbacks as _locked, Kevin Wolf, 2022/10/07
- [PULL 44/50] blockjob: protect iostatus field in BlockJob struct, Kevin Wolf, 2022/10/07
- [PULL 50/50] file-posix: Remove unused s->discard_zeroes, Kevin Wolf, 2022/10/07