diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2014-10-21 12:03:59 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-11-03 11:41:49 +0000 |
commit | 9e85cd5ce0d3fc99d910428c9fd9d267764d341b (patch) | |
tree | 6874635d868df256fa3fc8145763b7558a74a61e /stubs/chr-testdev.c | |
parent | 5a7e7a0bad17c96e03f55ed7019e2d7545e21a96 (diff) | |
download | qemu-9e85cd5ce0d3fc99d910428c9fd9d267764d341b.tar.gz qemu-9e85cd5ce0d3fc99d910428c9fd9d267764d341b.tar.bz2 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 'stubs/chr-testdev.c')
0 files changed, 0 insertions, 0 deletions