summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStefan Hajnoczi2014-10-21 13:03:59 +0200
committerStefan Hajnoczi2014-11-03 12:41:49 +0100
commit9e85cd5ce0d3fc99d910428c9fd9d267764d341b (patch)
tree6874635d868df256fa3fc8145763b7558a74a61e /include
parentblock: let mirror blockjob run in BDS AioContext (diff)
downloadqemu-9e85cd5ce0d3fc99d910428c9fd9d267764d341b.tar.gz
qemu-9e85cd5ce0d3fc99d910428c9fd9d267764d341b.tar.xz
qemu-9e85cd5ce0d3fc99d910428c9fd9d267764d341b.zip
block: let commit blockjob run in BDS AioContext
The commit block job must run in the BlockDriverState AioContext so that it works with dataplane. Acquire the AioContext in blockdev.c so starting the block job is safe. One detail here is that the bdrv_drain_all() must be moved inside the aio_context_acquire() region so requests cannot sneak in between the drain and acquire. The completion code in block/commit.c must perform backing chain manipulation and bdrv_reopen() from the main loop. Use block_job_defer_to_main_loop() to achieve that. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1413889440-32577-11-git-send-email-stefanha@redhat.com
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions