From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNZ28-0005MU-Mk for qemu-devel@nongnu.org; Mon, 28 Jul 2008 16:09:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNZ26-0005Lm-Bd for qemu-devel@nongnu.org; Mon, 28 Jul 2008 16:09:27 -0400 Received: from [199.232.76.173] (port=36692 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNZ26-0005Lg-38 for qemu-devel@nongnu.org; Mon, 28 Jul 2008 16:09:26 -0400 Received: from py-out-1112.google.com ([64.233.166.177]:61951) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNZ25-0004N0-73 for qemu-devel@nongnu.org; Mon, 28 Jul 2008 16:09:25 -0400 Received: by py-out-1112.google.com with SMTP id p76so3457197pyb.10 for ; Mon, 28 Jul 2008 13:09:23 -0700 (PDT) Message-ID: <488E2752.7030008@codemonkey.ws> Date: Mon, 28 Jul 2008 15:08:50 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] qcow3 - arbitrary metadata References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Nathaniel McCallum wrote: > A project I'm working on requires the ability to store arbitrary > metadata in the VM disk image. Thus, here is a patch that implements > that as qcow3. It basically replaces the > header.backing_store_{offset|size} with > header.metadata_{offset|size}. Metadata is then defined as NULL-byte > separated 'key:value' pairs. The attached qcow3 then stores the > backing file as 'Backing-File:/home/me/backing_file.img' in the > metadata section. I've included two patches. One is the full patch > against the latest SVN (qcow3.patch). The second patch is just the > diff between qcow2.c and qcow3.c so that you can easily see the changes. Can you provide more information about what the metadata is used for and why it's so important for the metadata to be in the image verses in a separate file? There are other possible ways of doing this that are less invasive. For instance, you could have a fake snapshot in the image that just contained your key values pairs. Introducing a whole new format is a pretty big change especially since you're duplicating a ton of code. Regards, Anthony Liguori > I've also wondered if it might be possible to backport these changes > into qcow2 instead of qcow3. However, this would break older versions > of qemu that claim to support qcow2. > > Nathaniel