summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2016-10-28 10:08:10 +0300
committerKevin Wolf <kwolf@redhat.com>2016-10-31 16:52:38 +0100
commit61b49e48b379db45f0ea91c93a61c873695549a9 (patch)
tree67dac53b67ee625ec04cfa2ec0610dfd5693a457 /block.c
parentf3ede4b05d1407d48314f0edada5e402865e641e (diff)
downloadqemu-61b49e48b379db45f0ea91c93a61c873695549a9.tar.gz
block: Support streaming to an intermediate layer
This makes sure that the image we are streaming into is open in read-write mode during the operation. Operation blockers are also set in all intermediate nodes, since they will be removed from the chain afterwards. Finally, this also unblocks the stream operation in backing files. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block.c b/block.c
index 2c87186ecf..c19c6c6d42 100644
--- a/block.c
+++ b/block.c
@@ -1428,9 +1428,11 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd)
backing_hd->drv ? backing_hd->drv->format_name : "");
bdrv_op_block_all(backing_hd, bs->backing_blocker);
- /* Otherwise we won't be able to commit due to check in bdrv_commit */
+ /* Otherwise we won't be able to commit or stream */
bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_COMMIT_TARGET,
bs->backing_blocker);
+ bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_STREAM,
+ bs->backing_blocker);
/*
* We do backup in 3 ways:
* 1. drive backup