qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 15/17] vmdk: Create streamOptimized as version 3


From: Kevin Wolf
Subject: [Qemu-devel] [PULL 15/17] vmdk: Create streamOptimized as version 3
Date: Wed, 20 Jan 2016 17:25:04 +0100

From: Fam Zheng <address@hidden>

VMware products accept only version 3 for streamOptimized, let's bump
the version.

Reported-by: Radoslav Gerganov <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 block/vmdk.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index 6b8596c..698679d 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1663,7 +1663,13 @@ static int vmdk_create_extent(const char *filename, 
int64_t filesize,
     }
     magic = cpu_to_be32(VMDK4_MAGIC);
     memset(&header, 0, sizeof(header));
-    header.version = zeroed_grain ? 2 : 1;
+    if (compress) {
+        header.version = 3;
+    } else if (zeroed_grain) {
+        header.version = 2;
+    } else {
+        header.version = 1;
+    }
     header.flags = VMDK4_FLAG_RGD | VMDK4_FLAG_NL_DETECT
                    | (compress ? VMDK4_FLAG_COMPRESS | VMDK4_FLAG_MARKER : 0)
                    | (zeroed_grain ? VMDK4_FLAG_ZERO_GRAIN : 0);
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]