From 8b1869daad17f313bf9a68fd3275448df0ecb7fb Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Wed, 13 May 2020 13:05:35 +0200 Subject: block: Make format drivers use child_of_bds Commonly, they need to pass the BDRV_CHILD_IMAGE set as the BdrvChildRole; but there are exceptions for drivers with external data files (qcow2 and vmdk). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-Id: <20200513110544.176672-26-mreitz@redhat.com> Signed-off-by: Kevin Wolf --- block/vdi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/vdi.c') diff --git a/block/vdi.c b/block/vdi.c index 653acb5fc1..d20698b3cc 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -378,8 +378,8 @@ static int vdi_open(BlockDriverState *bs, QDict *options, int flags, Error *local_err = NULL; QemuUUID uuid_link, uuid_parent; - bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file, 0, - false, errp); + bs->file = bdrv_open_child(NULL, options, "file", bs, &child_of_bds, + BDRV_CHILD_IMAGE, false, errp); if (!bs->file) { return -EINVAL; } -- cgit v1.2.3