block-migration: acquire AioContext as necessary
commitef0716df7f2f513afcacf3fcf6b104864f5b64fd
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 14 Feb 2016 17:17:04 +0000 (14 18:17 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 25 Feb 2016 11:14:18 +0000 (25 13:14 +0200)
tree2ffaadbfcafdc2573b59689cb5788ba8ec70770a
parent9ae91bc43f94d9b004b17f7213ef1b8d5ebe8e1a
block-migration: acquire AioContext as necessary

This is needed because dataplane will run during block migration as well.

The block device migration code is quite liberal in taking the iothread
mutex.  For simplicity, keep it the same way, even though one could
actually choose between the BQL (for regular BlockDriverStates) and
the AioContext (for dataplane BlockDriverStates).  When the block layer
is made fully thread safe, aio_context_acquire shall go away altogether.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
migration/block.c