diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 17:29:04 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-10-31 17:29:04 +0000 |
commit | 8ff7fd8a29e62e685b3977f6db2c2f3661e96da9 (patch) | |
tree | a3cca59321ecb1bd64fce6048ffc37b85e324c3b /block/commit.c | |
parent | 6bc56d317f7b5004ea2d89d264bddc8b4d081700 (diff) | |
parent | aa2623d817e7ecb62fd917e475ccc0d42dd1a413 (diff) | |
download | qemu-8ff7fd8a29e62e685b3977f6db2c2f3661e96da9.zip qemu-8ff7fd8a29e62e685b3977f6db2c2f3661e96da9.tar.gz qemu-8ff7fd8a29e62e685b3977f6db2c2f3661e96da9.tar.bz2 |
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches
# gpg: Signature made Mon 31 Oct 2016 16:10:07 GMT
# gpg: using RSA key 0x7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>"
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6
* remotes/kevin/tags/for-upstream: (29 commits)
qapi: allow blockdev-add for NFS
block/nfs: Introduce runtime_opts in NFS
block: Mention replication in BlockdevDriver enum docs
qemu-iotests: test 'offset' and 'size' options in raw driver
raw_bsd: add offset and size options
qemu-iotests: Test the 'base-node' parameter of 'block-stream'
block: Add 'base-node' parameter to the 'block-stream' command
qemu-iotests: Test streaming to a Quorum child
qemu-iotests: Add iotests.supports_quorum()
qemu-iotests: Test block-stream and block-commit in parallel
qemu-iotests: Test overlapping stream and commit operations
qemu-iotests: Test block-stream operations in parallel
qemu-iotests: Test streaming to an intermediate layer
docs: Document how to stream to an intermediate layer
block: Add QMP support for streaming to an intermediate layer
block: Support streaming to an intermediate layer
block: Block all intermediate nodes in commit_active_start()
block: Block all nodes involved in the block-commit operation
block: Check blockers in all nodes involved in a block-commit job
block: Use block_job_add_bdrv() in backup_start()
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/commit.c')
-rw-r--r-- | block/commit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/block/commit.c b/block/commit.c index 499ecca..a5e17f6 100644 --- a/block/commit.c +++ b/block/commit.c @@ -216,6 +216,7 @@ void commit_start(const char *job_id, BlockDriverState *bs, BlockReopenQueue *reopen_queue = NULL; int orig_overlay_flags; int orig_base_flags; + BlockDriverState *iter; BlockDriverState *overlay_bs; Error *local_err = NULL; @@ -260,6 +261,19 @@ void commit_start(const char *job_id, BlockDriverState *bs, } + /* Block all nodes between top and base, because they will + * disappear from the chain after this operation. */ + assert(bdrv_chain_contains(top, base)); + for (iter = top; iter != backing_bs(base); iter = backing_bs(iter)) { + block_job_add_bdrv(&s->common, iter); + } + /* overlay_bs must be blocked because it needs to be modified to + * update the backing image string, but if it's the root node then + * don't block it again */ + if (bs != overlay_bs) { + block_job_add_bdrv(&s->common, overlay_bs); + } + s->base = blk_new(); blk_insert_bs(s->base, base); |