From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT9OM-0002Wy-6D for qemu-devel@nongnu.org; Fri, 19 Apr 2013 07:22:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT9OL-0008Qk-0p for qemu-devel@nongnu.org; Fri, 19 Apr 2013 07:22:10 -0400 Received: from mail-qe0-f47.google.com ([209.85.128.47]:53435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT9OK-0008Qg-Td for qemu-devel@nongnu.org; Fri, 19 Apr 2013 07:22:08 -0400 Received: by mail-qe0-f47.google.com with SMTP id w7so2514360qeb.6 for ; Fri, 19 Apr 2013 04:22:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20130419091030.GA6825@localhost.localdomain> References: <1366343325-5252-1-git-send-email-famz@redhat.com> <1366343325-5252-3-git-send-email-famz@redhat.com> <20130419085904.GA28732@stefanha-thinkpad.redhat.com> <20130419091030.GA6825@localhost.localdomain> Date: Fri, 19 Apr 2013 13:22:08 +0200 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Qemu-devel] =?utf-8?q?=5BPATCH_2/5=5D_vmdk=3A_add_support_for_?= =?utf-8?b?4oCcemVyb2Vk4oCQZ3JhaW7igJ0gR1RF?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel , Kevin Wolf , Stefan Hajnoczi , Feiran Zheng On Fri, Apr 19, 2013 at 11:10 AM, Fam Zheng wrote: > On Fri, 04/19 10:59, Stefan Hajnoczi wrote: >> On Fri, Apr 19, 2013 at 11:48:42AM +0800, Fam Zheng wrote: >> > diff --git a/block/vmdk.c b/block/vmdk.c >> > index 450a721..5e60940 100644 >> > --- a/block/vmdk.c >> > +++ b/block/vmdk.c >> > @@ -33,10 +33,13 @@ >> > #define VMDK4_MAGIC (('K' << 24) | ('D' << 16) | ('M' << 8) | 'V') >> > #define VMDK4_COMPRESSION_DEFLATE 1 >> > #define VMDK4_FLAG_RGD (1 << 1) >> > +/* Zeroed-grain enable bit */ >> > +#define VMDK4_FLAG_ZG (1 << 2) >> >> Please use a clear name like VMDK4_FLAG_ZERO_GRAIN. >> >> > @@ -81,6 +84,8 @@ typedef struct VmdkExtent { >> > bool flat; >> > bool compressed; >> > bool has_marker; >> > + bool has_zero_grain; >> > + int version; >> >> uint32_t according to the spec. Please use fixed-size integer types >> instead of int, long, etc which can change depending on the host >> architecture. > > This is an internal structure holding information for extent, used the > same way as BDRVVmdkState, there is no direct correspondence to file > header fields, so I think it should be OK, as `int qcow_version' is also > found in block/qcow2.h. What is the benefit of changing the type internally? Stefan