diff mbox

[2/2] virtio-blk: allow block_resize with dataplane

Message ID 1408369949-3128-3-git-send-email-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi Aug. 18, 2014, 1:52 p.m. UTC
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>
---
 hw/block/dataplane/virtio-blk.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Max Reitz Aug. 18, 2014, 3:54 p.m. UTC | #1
On 18.08.2014 15:52, Stefan Hajnoczi wrote:
> 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>
> ---
>   hw/block/dataplane/virtio-blk.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Max Reitz <mreitz@redhat.com>
diff mbox

Patch

diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index d6ba65c..b042caf 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -192,6 +192,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;
 }