summaryrefslogtreecommitdiff
path: root/block/qed.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-11-18 15:32:17 +0100
committerKevin Wolf <kwolf@redhat.com>2017-06-26 14:51:15 +0200
commit0806c3b5dd1aced4c50eda65e9ecc9cfab4ee58e (patch)
tree2eb5b8cc2417d5881d0a26865ad510671964a858 /block/qed.h
parent89f89709c7c66edd95c2288eae7ec4006256348a (diff)
downloadqemu-0806c3b5dd1aced4c50eda65e9ecc9cfab4ee58e.tar.gz
qed: Use CoQueue for serialising allocations
Now that we're running in coroutine context, the ad-hoc serialisation code (which drops a request that has to wait out of coroutine context) can be replaced by a CoQueue. This means that when we resume a serialised request, it is running in coroutine context again and its I/O isn't blocking any more. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qed.h')
-rw-r--r--block/qed.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/qed.h b/block/qed.h
index 8644fed3a7..37558e425d 100644
--- a/block/qed.h
+++ b/block/qed.h
@@ -163,7 +163,8 @@ typedef struct {
uint32_t l2_mask;
/* Allocating write request queue */
- QSIMPLEQ_HEAD(, QEDAIOCB) allocating_write_reqs;
+ QEDAIOCB *allocating_acb;
+ CoQueue allocating_write_reqs;
bool allocating_write_reqs_plugged;
/* Periodic flush and clear need check flag */