block: acquire AioContext in generic blockjob QMP commands
commit3d948cdf3760b52238038626a7ffa7d30913060b
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 21 Oct 2014 11:03:50 +0000 (21 12:03 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 3 Nov 2014 11:41:49 +0000 (3 11:41 +0000)
treeb4776c0a11a4aa89d0d3f280e82ffd9da5b9607a
parent78fa65821dd581f375bf8bce47d6e00e64a8066a
block: acquire AioContext in generic blockjob QMP commands

block-job-set-speed, block-job-cancel, block-job-pause,
block-job-resume, and block-job-complete must acquire the
BlockDriverState AioContext so that it is safe to access bs.

At the moment bs->job is always NULL when dataplane is active because op
blockers prevent blockjobs from starting.  Once the rest of the blockjob
API has been made aware of AioContext we can drop the op blocker.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 1413889440-32577-2-git-send-email-stefanha@redhat.com
blockdev.c