qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 2/2] vmdk: refuse enabling zeroed grain with flat


From: Fam Zheng
Subject: [Qemu-devel] [PATCH v2 2/2] vmdk: refuse enabling zeroed grain with flat images
Date: Thu, 10 Oct 2013 20:38:32 +0800

This is a header flag and we needs sparse for the header.

Signed-off-by: Fam Zheng <address@hidden>
---
 block/vmdk.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/vmdk.c b/block/vmdk.c
index 4f8ae77..90340eb 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1664,6 +1664,10 @@ static int vmdk_create(const char *filename, 
QEMUOptionParameter *options,
         error_setg(errp, "Flat image can't have backing file");
         return -ENOTSUP;
     }
+    if (flat && zeroed_grain) {
+        error_setg(errp, "Flat image can't enable zeroed grain");
+        return -ENOTSUP;
+    }
     if (backing_file) {
         BlockDriverState *bs = bdrv_new("");
         ret = bdrv_open(bs, backing_file, NULL, 0, NULL, errp);
-- 
1.8.3.1




reply via email to

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