aboutsummaryrefslogtreecommitdiff
path: root/block/qed-cluster.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-06-12 11:12:41 +0200
committerKevin Wolf <kwolf@redhat.com>2017-06-26 14:51:15 +0200
commit87f0d88261d120e428cd23305775026556e6cce6 (patch)
treed1e5ba69edaacf5f22b593a4bc0fe3234c91485e /block/qed-cluster.c
parentc0e8f98927929b65ffbfb320b7a1c79e0e620006 (diff)
downloadqemu-87f0d88261d120e428cd23305775026556e6cce6.zip
qemu-87f0d88261d120e428cd23305775026556e6cce6.tar.gz
qemu-87f0d88261d120e428cd23305775026556e6cce6.tar.bz2
qed: Add coroutine_fn to I/O path functions
Now that we stay in coroutine context for the whole request when doing reads or writes, we can add coroutine_fn annotations to many functions that can do I/O or yield directly. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qed-cluster.c')
-rw-r--r--block/qed-cluster.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/qed-cluster.c b/block/qed-cluster.c
index 88dc979..d8d6e66 100644
--- a/block/qed-cluster.c
+++ b/block/qed-cluster.c
@@ -86,8 +86,9 @@ static unsigned int qed_count_contiguous_clusters(BDRVQEDState *s,
* On failure QED_CLUSTER_L2 or QED_CLUSTER_L1 is returned for missing L2 or L1
* table offset, respectively. len is number of contiguous unallocated bytes.
*/
-int qed_find_cluster(BDRVQEDState *s, QEDRequest *request, uint64_t pos,
- size_t *len, uint64_t *img_offset)
+int coroutine_fn qed_find_cluster(BDRVQEDState *s, QEDRequest *request,
+ uint64_t pos, size_t *len,
+ uint64_t *img_offset)
{
uint64_t l2_offset;
uint64_t offset = 0;