From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41072) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrZTn-0004b0-SO for qemu-devel@nongnu.org; Fri, 13 Dec 2013 15:37:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrZTi-00042D-9J for qemu-devel@nongnu.org; Fri, 13 Dec 2013 15:36:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrZTi-00041u-0K for qemu-devel@nongnu.org; Fri, 13 Dec 2013 15:36:54 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBDKap7p026007 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 13 Dec 2013 15:36:52 -0500 Message-ID: <52AB6FE2.2070903@redhat.com> Date: Fri, 13 Dec 2013 13:36:50 -0700 From: Eric Blake MIME-Version: 1.0 References: <1386954633-28905-1-git-send-email-mreitz@redhat.com> <1386954633-28905-13-git-send-email-mreitz@redhat.com> <20131213201958.GZ3916@dhcp-200-207.str.redhat.com> In-Reply-To: <20131213201958.GZ3916@dhcp-200-207.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aVeU8pamRua1B6pgccdLJqcq06Qxij6x8" Subject: Re: [Qemu-devel] [PATCH v5 12/22] block: Allow recursive "file"s List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Max Reitz Cc: Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aVeU8pamRua1B6pgccdLJqcq06Qxij6x8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/13/2013 01:19 PM, Kevin Wolf wrote: > Am 13.12.2013 um 18:10 hat Max Reitz geschrieben: >> It should be possible to use a format as a driver for a file which in >> turn requires another file, i.e., nesting file formats. >> >> Signed-off-by: Max Reitz >=20 > Hm, does this do what I think it does? That depends on what you think it's doing :) >=20 > $ ./qemu-img convert -O qcow2 /home/kwolf/images/hd.img /tmp/hd.qcow2 > $ ./qemu-img convert -f raw -O qcow2 /tmp/hd.qcow2 /tmp/hd.qcow2.qcow2 > $ x86_64-softmmu/qemu-system-x86_64 -drive driver=3Dqcow2,file.driver=3D= qcow2,file.file.driver=3Dfile,file.file.filename=3D/tmp/hd.qcow2.qcow2 >=20 > I can't decide whether this is awesomeness or insanity, but in any case= > it works with this patch. :-) So if I understood your example, you just created a qcow2 file, where the non-metadata contents of that file are themselves a qcow2 data format= =2E Oh my. This could get nasty if someone ever wanted to try to get libvirt to feed the nested contents to a guest (right now, libvirt has a hard-coded assumption that qcow2 files only ever wrap raw data in the non-metadata portion; there's no easy way to represent in the libvirt storage volume XML a file where you want the nested guest contents of qcow2 data wrapped inside the non-metadata portion of an outermost qcow2 file). I guess it's not much different from a raw block device that has a partition table, then in the first partition, you recursively add another partition table (which is what you get when you hand one partition of a host block device to the guest, and the guest then partitions what it thinks is a full disk). And libguestfs is able to see through nested partition tables, so on that front, the functionality is similar. Of course, the recursion has its use for blkverify and blkdebug, but maybe (for our sanity) it would be worth preventing nesting across any format that has metadata wrapping contents. >=20 > Worth a qemu-iotests case, I think. That's for sure :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --aVeU8pamRua1B6pgccdLJqcq06Qxij6x8 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.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSq2/iAAoJEKeha0olJ0NqRMUIAJtOBmic6eF9PXw/p0L6GBkx xil4OtYJSgvsfE23Pf8bCiluKlBupVsNkEXOM0wWCXsI6pHM4pAF/fS4Tw3pO9vX 92JDrQt1GuG11ZmrrWQuslTRWV+OjnfLvAFWwBx0VQYXbKdzxGzNXsbCrcgpbvoG 2HEf0yPlg49pDbGJkwRK/OcKQJQGZQBfRWuokW0gOYg+kjAjfC3jzDEq5SxabEYh 3WyrVsJlqZWsfR9WFhhKv7q7ARNzaTOhJggHjFA4p/evw8rIF9PRUN2kcINtAPjd 3d/+zeV5AxB90VUtJT51Z4NFznaNoknBv5G8QupPEddvLw+3FqnpjGu6gQqLTJ4= =W3mB -----END PGP SIGNATURE----- --aVeU8pamRua1B6pgccdLJqcq06Qxij6x8--