summaryrefslogtreecommitdiffstats
path: root/block.c
diff options
context:
space:
mode:
authorPeter Maydell2021-05-19 17:10:35 +0200
committerPeter Maydell2021-05-19 17:10:35 +0200
commitd874bc081600528f0400977460b4f98f21e156a1 (patch)
tree3201cf478059f8dfcd18acac0212a5bf33df3305 /block.c
parentMerge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-re... (diff)
parentvhost-user-blk: Check that num-queues is supported by backend (diff)
downloadqemu-d874bc081600528f0400977460b4f98f21e156a1.tar.gz
qemu-d874bc081600528f0400977460b4f98f21e156a1.tar.xz
qemu-d874bc081600528f0400977460b4f98f21e156a1.zip
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches - vhost-user-blk: Fix error handling during initialisation - Add test cases for the vhost-user-blk export - Fix leaked Transaction objects - qcow2: Expose dirty bit in 'qemu-img info' # gpg: Signature made Tue 18 May 2021 11:57:46 BST # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kwolf@redhat.com" # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: vhost-user-blk: Check that num-queues is supported by backend virtio: Fail if iommu_platform is requested, but unsupported vhost-user-blk: Get more feature flags from vhost device vhost-user-blk: Improve error reporting in realize vhost-user-blk: Don't reconnect during initialisation vhost-user-blk: Make sure to set Error on realize failure vhost-user-blk-test: test discard/write zeroes invalid inputs tests/qtest: add multi-queue test case to vhost-user-blk-test test: new qTest case to test the vhost-user-blk-server block/export: improve vu_blk_sect_range_ok() block: Fix Transaction leak in bdrv_reopen_multiple() block: Fix Transaction leak in bdrv_root_attach_child() qcow2: set bdi->is_dirty Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block.c')
-rw-r--r--block.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/block.c b/block.c
index 75a82af641..0dc97281dc 100644
--- a/block.c
+++ b/block.c
@@ -2916,13 +2916,14 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState *child_bs,
child_role, perm, shared_perm, opaque,
&child, tran, errp);
if (ret < 0) {
- bdrv_unref(child_bs);
- return NULL;
+ assert(child == NULL);
+ goto out;
}
ret = bdrv_refresh_perms(child_bs, errp);
- tran_finalize(tran, ret);
+out:
+ tran_finalize(tran, ret);
bdrv_unref(child_bs);
return child;
}
@@ -4049,7 +4050,7 @@ int bdrv_reopen_multiple(BlockReopenQueue *bs_queue, Error **errp)
ret = bdrv_flush(bs_entry->state.bs);
if (ret < 0) {
error_setg_errno(errp, -ret, "Error flushing drive");
- goto cleanup;
+ goto abort;
}
}