virtio-blk: allow block_resize with dataplane
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 18 Aug 2014 13:52:29 +0000 (14:52 +0100)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Aug 2014 09:53:52 +0000 (11:53 +0200)
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>
hw/block/dataplane/virtio-blk.c

index 24a6b71..c07adc6 100644 (file)
@@ -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;
 }