From 466560b9fcada2656b276eb30e25da15a6e706df Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Mon, 18 Aug 2014 14:52:29 +0100 Subject: 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 Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- hw/block/dataplane/virtio-blk.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.1