Skip to content
Snippets Groups Projects
Commit 7502be83 authored by Sam Eiderman's avatar Sam Eiderman Committed by Kevin Wolf
Browse files

vmdk: Set vmdk parent backing_format to vmdk


Commit b69864e5 ("vmdk: Support version=3 in VMDK descriptor files")
fixed the probe function to correctly guess vmdk descriptors with
version=3.

This solves the issue where vmdk snapshot with parent vmdk descriptor
containing "version=3" would be treated as raw instead vmdk.

In the future case where a new vmdk version is introduced, we will again
experience this issue, even if the user will provide "-f vmdk" it will
only apply to the tip image and not to the underlying "misprobed" parent
image.

The code in vmdk.c already assumes that the backing file of vmdk must be
vmdk (see vmdk_is_cid_valid which returns 0 if backing file is not
vmdk).

So let's make it official by supplying the backing_format as vmdk.

Reviewed-by: default avatarMark Kanda <mark.kanda@oracle.com>
Reviewed-By: default avatarLiran Alon <liran.alon@oracle.com>
Reviewed-by: default avatarArbel Moshe <arbel.moshe@oracle.com>
Signed-off-by: default avatarShmuel Eiderman <shmuel.eiderman@oracle.com>
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Reviewed-by: default avatarFam Zheng <fam@euphon.net>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 126734c4
No related branches found
No related tags found
No related merge requests found
......@@ -397,6 +397,8 @@ static int vmdk_parent_open(BlockDriverState *bs)
pstrcpy(bs->auto_backing_file, end_name - p_name + 1, p_name);
pstrcpy(bs->backing_file, sizeof(bs->backing_file),
bs->auto_backing_file);
pstrcpy(bs->backing_format, sizeof(bs->backing_format),
"vmdk");
}
out:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment