qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 05/12] VMDK: add field BDRVVmdkState.desc_off


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v6 05/12] VMDK: add field BDRVVmdkState.desc_offset
Date: Fri, 01 Jul 2011 15:08:09 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

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 <address@hidden>
> ---
>  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



reply via email to

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