diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-05-05 16:46:37 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-05-05 16:46:37 +0100 |
commit | ea1329bb3a8d5cd25b70e3dbf73e7ded4d5ad756 (patch) | |
tree | d432b9112c080f23593c66efee6b9bec3dd0caa1 /block/vhdx.c | |
parent | f19d118bed77bb95681b07f4e76dbb700c16918d (diff) | |
parent | 4ce5dd3e9b5ee0fac18625860eb3727399ee965e (diff) |
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-05-05' into staging
Block patches:
- Asynchronous copying for block-copy (i.e., the backup job)
- Allow resizing of qcow2 images when they have internal snapshots
- iotests: Logging improvements for Python tests
- iotest 153 fix, and block comment cleanups
# gpg: Signature made Tue 05 May 2020 13:56:58 BST
# gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg: issuer "mreitz@redhat.com"
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40
* remotes/maxreitz/tags/pull-block-2020-05-05: (24 commits)
block/block-copy: use aio-task-pool API
block/block-copy: refactor task creation
block/block-copy: add state pointer to BlockCopyTask
block/block-copy: alloc task on each iteration
block/block-copy: rename in-flight requests to tasks
Fix iotest 153
block: Comment cleanups
qcow2: Tweak comment about bitmaps vs. resize
qcow2: Allow resize of images with internal snapshots
block: Add blk_new_with_bs() helper
iotests: use python logging for iotests.log()
iotests: Mark verify functions as private
iotest 258: use script_main
iotests: add script_initialize
iotests: add hmp helper with logging
iotests: limit line length to 79 chars
iotests: touch up log function signature
iotests: drop pre-Python 3.4 compatibility code
iotests: alphabetize standard imports
iotests: add pylintrc file
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/vhdx.c')
-rw-r--r-- | block/vhdx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/vhdx.c b/block/vhdx.c index aedd782604..e11fb7413a 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1983,10 +1983,10 @@ static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts, return -EIO; } - blk = blk_new(bdrv_get_aio_context(bs), - BLK_PERM_WRITE | BLK_PERM_RESIZE, BLK_PERM_ALL); - ret = blk_insert_bs(blk, bs, errp); - if (ret < 0) { + blk = blk_new_with_bs(bs, BLK_PERM_WRITE | BLK_PERM_RESIZE, BLK_PERM_ALL, + errp); + if (!blk) { + ret = -EPERM; goto delete_and_exit; } blk_set_allow_write_beyond_eof(blk, true); |