From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbCou-0006TW-9J for qemu-devel@nongnu.org; Wed, 21 Nov 2012 11:06:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbCoo-0003UJ-88 for qemu-devel@nongnu.org; Wed, 21 Nov 2012 11:06:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbCoo-0003U7-09 for qemu-devel@nongnu.org; Wed, 21 Nov 2012 11:06:30 -0500 Message-ID: <50ACFC00.5080800@redhat.com> Date: Wed, 21 Nov 2012 09:06:24 -0700 From: Eric Blake MIME-Version: 1.0 References: <1353488464-82756-1-git-send-email-dietmar@proxmox.com> <1353488464-82756-3-git-send-email-dietmar@proxmox.com> In-Reply-To: <1353488464-82756-3-git-send-email-dietmar@proxmox.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigDCF37AEEF75FE8A64BE772AA" Subject: Re: [Qemu-devel] [PATCH 3/5] introduce new vma archive format List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dietmar Maurer Cc: kwolf@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDCF37AEEF75FE8A64BE772AA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/21/2012 02:01 AM, Dietmar Maurer wrote: > This is a very simple archive format, see docs/specs/vma_spec.txt >=20 > Signed-off-by: Dietmar Maurer > --- > +++ b/docs/specs/vma_spec.txt > @@ -0,0 +1,24 @@ > +=3DVirtual Machine Archive format (VMA)=3D > + > +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 (dietmar@proxmox.com) > + * > + * This work is licensed under the terms of the GNU GPL, version 2. S= ee 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. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigDCF37AEEF75FE8A64BE772AA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQrPwBAAoJEKeha0olJ0Nqj2gH/3SePBIU3qaafQEAzsWP6c+v 8bo7EnrHf9i/si0jWVNQJdqzsmTu3S5j+ZS2KGlzkK8FU2t9aTiUH9GTr4MvkIqT JUAg0hB2N1QITUzxDekKXAULz+IOl91dscGCw/UBDJwrcP6rKij8dmWE6zHsl9WQ IZbPsJX8pi1w4D7ibLd4UyZkFDg79tZg4v/pOxoHeb+6WbolOI2svvNWihlOBFLE xmdD70QX2t2PfoLHuf6idG0DZnoyJGWFoC8Ua8ttrTPn5rL2+WjU9ihVUX0ngvj+ eGG1brIBss9f9STLVGY7P33lTPSvAAXNJrn9ybyKl3uG1WpplbeVKvUdASqtPeo= =B6do -----END PGP SIGNATURE----- --------------enigDCF37AEEF75FE8A64BE772AA--