From: Stefan Hajnoczi Date: Mon, 18 Aug 2014 13:52:29 +0000 (+0100) Subject: virtio-blk: allow block_resize with dataplane X-Git-Tag: v2.2.0-rc0~164^2~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=466560b9fcada2656b276eb30e25da15a6e706df;p=thirdparty%2Fqemu.git 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 --- diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 24a6b713952..c07adc6e4f4 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; }