qed: Simplify request handling

Now that we process a request in the same coroutine from beginning to
end and don't drop out of it any more, we can look like a proper
coroutine-based driver and simply call qed_aio_next_io() and get a
return value from it instead of spawning an additional coroutine that
reenters the parent when it's done.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Kevin Wolf 2016-11-18 14:47:36 +01:00
parent 0806c3b5dd
commit 48cc565e76
2 changed files with 22 additions and 82 deletions

View file

@ -129,8 +129,7 @@ enum {
};
typedef struct QEDAIOCB {
BlockAIOCB common;
int bh_ret; /* final return status for completion bh */
BlockDriverState *bs;
QSIMPLEQ_ENTRY(QEDAIOCB) next; /* next request */
int flags; /* QED_AIOCB_* bits ORed together */
uint64_t end_pos; /* request end on block device, in bytes */