]> Git Repo - qemu.git/commitdiff
vmdk: Set vmdk parent backing_format to vmdk
authorSam Eiderman <[email protected]>
Tue, 26 Mar 2019 19:58:37 +0000 (21:58 +0200)
committerKevin Wolf <[email protected]>
Tue, 30 Apr 2019 13:29:00 +0000 (15:29 +0200)
Commit b69864e5a ("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: Mark Kanda <[email protected]>
Reviewed-By: Liran Alon <[email protected]>
Reviewed-by: Arbel Moshe <[email protected]>
Signed-off-by: Shmuel Eiderman <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/vmdk.c

index 8dec6ef7677bc4f50960bf0bb0c5232c336d7cf8..de8cb859f82724520156d9d8241a69b8208e3dc1 100644 (file)
@@ -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:
This page took 0.030263 seconds and 4 git commands to generate.