aboutsummaryrefslogtreecommitdiff
path: root/block/qed-table.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-11-16 17:31:14 +0100
committerKevin Wolf <kwolf@redhat.com>2017-06-26 14:51:14 +0200
commit3b7cd9fd8fc2d34da6a42f49421e3549918adf58 (patch)
tree71e52b68f8001e4c6c5c6638201ec54ee78634cf /block/qed-table.c
parent24990c5b959c3a24d76ccf96303c1f70556f1dd2 (diff)
downloadqemu-arm-3b7cd9fd8fc2d34da6a42f49421e3549918adf58.tar.gz
qed: Use bottom half to resume waiting requests
The qed driver serialises allocating write requests. When the active allocation is finished, the AIO callback is called, but after this, the next allocating request is immediately processed instead of leaving the coroutine. Resuming another allocation request in the same request coroutine means that the request now runs in the wrong coroutine. The following is one of the possible effects of this: The completed request will generally reenter its request coroutine in a bottom half, expecting that it completes the request in bdrv_driver_pwritev(). However, if the second request actually yielded before leaving the coroutine, the reused request coroutine is in an entirely different place and is reentered prematurely. Not a good idea. Let's make sure that we exit the coroutine after completing the first request by resuming the next allocating request only with a bottom half. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qed-table.c')
0 files changed, 0 insertions, 0 deletions