Received: from eggs.gnu.org ([2001:4830:134:3::10]:37905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcUz2-0004Ha-RI for qemu-devel@nongnu.org; Thu, 17 Sep 2015 04:56:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcUz1-0007I6-VL for qemu-devel@nongnu.org; Thu, 17 Sep 2015 04:56:00 -0400 Date: Thu, 17 Sep 2015 10:55:55 +0200 From: Kevin Wolf Message-ID: <20150917085555.GB4884@noname.redhat.com> References: <1442466250-27787-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442466250-27787-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH] vmdk: Create streamOptimized as version 3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, rgerganov@vmware.com Am 17.09.2015 um 07:04 hat Fam Zheng geschrieben: > VMware products accept only version 3 for streamOptimized, let's bump > the version. > > Reported-by: Radoslav Gerganov > Signed-off-by: Fam Zheng Radoslav, can I have your Reviewed-by and/or Tested-by for this patch? Kevin > block/vmdk.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/block/vmdk.c b/block/vmdk.c > index be0d640..37326c3 100644 > --- a/block/vmdk.c > +++ b/block/vmdk.c > @@ -1651,7 +1651,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); > -- > 2.4.3 >