From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcdPN-00056I-GW for qemu-devel@nongnu.org; Fri, 01 Jul 2011 09:05:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcdPM-0005U7-4J for qemu-devel@nongnu.org; Fri, 01 Jul 2011 09:05:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcdPL-0005Ts-MY for qemu-devel@nongnu.org; Fri, 01 Jul 2011 09:05:19 -0400 Message-ID: <4E0DC6B9.8060409@redhat.com> Date: Fri, 01 Jul 2011 15:08:09 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1309496142-14228-1-git-send-email-famcool@gmail.com> <1309496142-14228-6-git-send-email-famcool@gmail.com> In-Reply-To: <1309496142-14228-6-git-send-email-famcool@gmail.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 05/12] VMDK: add field BDRVVmdkState.desc_offset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: stefanha@gmail.com, qemu-devel@nongnu.org, hch@lst.de Am 01.07.2011 06:55, schrieb Fam Zheng: > There are several occurrence of magic number 0x200 as the descriptor > offset within mono sparse image file. This is not the case for images > with separate descriptor file. So a field is added to BDRVVmdkState to > hold the correct value. > > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 26 ++++++++++++++++---------- > 1 files changed, 16 insertions(+), 10 deletions(-) > > @@ -296,7 +300,6 @@ static int vmdk_snapshot_create(const char *filename, const char *backing_file) > ret = -errno; > goto fail; > } > - /* the descriptor offset = 0x200 */ > if (lseek(p_fd, 0x200, SEEK_SET) == -1) { > ret = -errno; > goto fail; Is this comment wrong or why do you remove it? I think for the newly created image it is correct and with this patch we have an unexplained magic 0x200 in the code. Kevin