qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/5] introduce new vma archive format


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 3/5] introduce new vma archive format
Date: Wed, 21 Nov 2012 09:06:24 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2

On 11/21/2012 02:01 AM, Dietmar Maurer wrote:
> This is a very simple archive format, see docs/specs/vma_spec.txt
> 
> Signed-off-by: Dietmar Maurer <address@hidden>
> ---

> +++ b/docs/specs/vma_spec.txt
> @@ -0,0 +1,24 @@
> +=Virtual Machine Archive format (VMA)=
> +
> +This format contains a header which includes the VM configuration as
> +binary blobs, and a list of devices (dev_id, name).
> +
> +The actual VM image date is stored inside extends. En extend contains

s/date/data/
s/extends. En extend/extents. An extent/

> +up to 64 clusters, and start with a 512 byte header containing
> +additional information for those clusters.
> +
> +We use a cluster size of 65536, and use 8 bytes for each
> +cluster in the header to store the following information:
> +
> +* 1 byte dev_id (to identity the drive)
> +* 2 bytes zero indicator (mark zero regions (16x4069))

s/4069/4096/

> +* 4 bytes cluster number

Is that sufficient, or is it possible to have an image larger than
64k*4G that would overflow?

> +* 1 byte not used (reserved)
> +
> +We only store non-zero blocks (such block is 4096 bytes).
> +
> +Each archive is marked with an unique uuid. The archive header and all

s/an unique/a/ (by definition, 'uuid' is an acronym that already means
unique; also, it is 'a' and not 'an' before any 'u' pronounced as 'y',
which is true for both 'unique' and a spelled-out 'uuid')

> +extend headers includes that uuid and a MD5 checksum (over header

s/extend/extent/

> +data).
> +
> +
> diff --git a/vma-reader.c b/vma-reader.c
> new file mode 100644
> index 0000000..7a54de5
> --- /dev/null
> +++ b/vma-reader.c
> @@ -0,0 +1,720 @@
> +/*
> + * VMA: Virtual Machine Archive
> + *
> + * Copyright (C) Proxmox Server Solutions

Missing a year.

> + *
> + * Authors:
> + *  Dietmar Maurer (address@hidden)
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2.  See

Can you please use GPLv2+ (the 'or later' clause is essential if you
want your work to be reusable in GPLv3[+] projects)?

I didn't review the code, just the specification.  I have to wonder how
much of your work overlaps with Paolo's 'drive-mirror' and NBD server
work; and it seems to me that it is better to use 'drive-mirror' for
doing backup work into existing disk formats, rather than inventing yet
another archive format.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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