From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8o95-0006YZ-MW for qemu-devel@nongnu.org; Mon, 12 Aug 2013 05:10:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8o90-0007ae-NX for qemu-devel@nongnu.org; Mon, 12 Aug 2013 05:10:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8o90-0007aH-FE for qemu-devel@nongnu.org; Mon, 12 Aug 2013 05:10:30 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7C9AU6D030814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 12 Aug 2013 05:10:30 -0400 Date: Mon, 12 Aug 2013 17:10:25 +0800 From: Fam Zheng Message-ID: <20130812091025.GA9171@localhost.localdomain> References: <1376237638-6968-1-git-send-email-pbonzini@redhat.com> <1376237638-6968-2-git-send-email-pbonzini@redhat.com> <20130812013144.GA11870@localhost.localdomain> <722588588.272464.1376293220987.JavaMail.root@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <722588588.272464.1376293220987.JavaMail.root@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] vmdk: support vmfsSparse files Reply-To: famz@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, qemu-devel@nongnu.org On Mon, 08/12 03:40, Paolo Bonzini wrote: > > > ----- Original Message ----- > > From: "Fam Zheng" > > To: "Paolo Bonzini" > > Cc: qemu-devel@nongnu.org, kwolf@redhat.com > > Sent: Monday, August 12, 2013 3:31:44 AM > > Subject: Re: [PATCH 1/2] vmdk: support vmfsSparse files > > > > On Sun, 08/11 18:13, Paolo Bonzini wrote: > > > VMware ESX hosts use a variant of the VMDK3 format, identified by the > > > vmfsSparse create type ad the VMFSSPARSE extent type. > > > > > > It has 16 KB grain tables (L2) and a variable-size grain directory (L1). > > > In addition, the grain size is always 512, but that is not a problem > > > because it is included in the header. > > > > > > The format of the extents is documented in the VMDK spec. The format > > > of the descriptor file is not documented precisely, but it can be > > > found at http://kb.vmware.com/kb/10026353 (Recreating a missing virtual > > > machine disk (VMDK) descriptor file for delta disks). > > > > > I don't have access to this link > > It only works from Google. Try Googling for "vmfssparse delta". > > > , could you include some documents to > > this descriptor format in comment or commit message? IIRC, it's only the > > type be "VMFSSPARSE", right? > > Yes. And "VMFS" for the base (patch 2). > > > What version of ESX has this format? > > At least 4.0 and newer. > > > This needs to be rebased, vmdk_add_extent() signature has been changed > > in: > > > > commit 8aa1331c09a9b899f48d97f097bb49b7d458be1c > > Author: Fam Zheng > > Date: Tue Aug 6 15:44:51 2013 +0800 > > > > vmdk: check granularity field in opening > > > > Granularity is used to calculate the cluster size and allocate r/w > > buffer. Check the value from image before using it, so we don't > > abort() > > for unbounded memory allocation. > > > > Signed-off-by: Fam Zheng > > Signed-off-by: Kevin Wolf > > > > Since the new function is a variant of vmdk_open_vmdk3(), would you > > consider doing a tiny refactor and reduce duplication? And l1dir_size > > and granularity need to be checked, as in vmdk_open_vmdk4(). > > I am not sure how to refactor it... in fact, since I'm on vacation I > wouldn't mind if somebody else fixes the patch. I can test it either > tomorrow or next week. > OK, I'll take it for your happy vocation. :) -- Fam