summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorStefan Hajnoczi2014-08-18 15:52:29 +0200
committerKevin Wolf2014-08-20 11:53:52 +0200
commit466560b9fcada2656b276eb30e25da15a6e706df (patch)
treefd04cce0f35449f6cf36fec27426e4fc930e189a /hw
parentblock: acquire AioContext in qmp_block_resize() (diff)
downloadqemu-466560b9fcada2656b276eb30e25da15a6e706df.tar.gz
qemu-466560b9fcada2656b276eb30e25da15a6e706df.tar.xz
qemu-466560b9fcada2656b276eb30e25da15a6e706df.zip
virtio-blk: allow block_resize with dataplane
Now that block_resize acquires the AioContext we can safely allow resizing the disk. Reported-by: Andrey Korolyov <andrey@xdel.ru> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/block/dataplane/virtio-blk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 24a6b71395..c07adc6e4f 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -193,6 +193,7 @@ void virtio_blk_data_plane_create(VirtIODevice *vdev, VirtIOBlkConf *blk,
error_setg(&s->blocker, "block device is in use by data plane");
bdrv_op_block_all(blk->conf.bs, s->blocker);
+ bdrv_op_unblock(blk->conf.bs, BLOCK_OP_TYPE_RESIZE, s->blocker);
*dataplane = s;
}