From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNp8B-0000cE-87 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 14:11:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNp8A-0003b2-14 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 14:11:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNp89-0003ar-Nn for qemu-devel@nongnu.org; Mon, 15 Oct 2012 14:11:09 -0400 Message-ID: <507C51B6.1010803@redhat.com> Date: Mon, 15 Oct 2012 12:11:02 -0600 From: Eric Blake MIME-Version: 1.0 References: <507C50E9.1050706@redhat.com> In-Reply-To: <507C50E9.1050706@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig58DA56D2CA54245B16B2653C" Subject: Re: [Qemu-devel] [PATCH] qemu-img rebase: allow backing file to be specified as '-' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Alex Bligh This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig58DA56D2CA54245B16B2653C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 10/15/2012 12:07 PM, Eric Blake wrote: > On 10/15/2012 11:29 AM, Alex Bligh wrote: >> This patch allows qemu-img rebase to rebase an image to >> have no backing file, as opposed to merely allowing it to >> rebase to an existing backing file. >=20 > You can already do that by rebasing to the empty string. And it is > feasible (although unlikely) to have a file named '-', where your patch= > would make it impossible to use that file directly (although you could > still use './-'). NACK. >=20 > $ qemu-img info bar > image: bar > file format: qcow2 > virtual size: 0 (0 bytes) > disk size: 192K > cluster_size: 65536 > backing file: foo > $ qemu-img rebase -u -b '' bar > $ qemu-img info bar > image: bar > file format: qcow2 > virtual size: 0 (0 bytes) > disk size: 192K > cluster_size: 65536 On the other hand, if you don't use -u, then qemu-img complains: $ qemu-img rebase -b '' bar qemu-img: Could not open new backing file '' So I think a better patch would be to allow rebase-by-pull to work the same as unsafe rebase, by honoring the empty string as a request to pull the entire chain into the destination and leave no backing file. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig58DA56D2CA54245B16B2653C 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 Mozilla - http://www.enigmail.net/ iQEcBAEBCAAGBQJQfFG2AAoJEKeha0olJ0Nq0eUIAJxqlGiQPjP/XLnoKjoiOq/O DpqUtnwUIYHEEQIRLdH7qurTS3J/F5AHXTLRlAg8Ko1dq5xHuJ8wX3T5CGGnEocm sfj0ABhRjHCAU8PvbTf/xhV1GXNrZgh0TQOgDjqIdz/XaUWaKiEniY+KsBuIfIaz wN79wZSQwgG/MrEzqvF8TyzCDcINQlSOn7w07dgfPuYocDyO6JyUnrXN+HKr5SXU PHEK5sA1wT/1wuPx/GLf9xFXLpRW6fqWW2lEZPgfwJB+tV7ecI4ZSobDaYHzIC1U 0P/jHBqqT6e+gl6ZLM6hkAzbZhQPJ5S4afpBNXnYfl+H07N7bIdXeNCC/K/orjI= =i3pn -----END PGP SIGNATURE----- --------------enig58DA56D2CA54245B16B2653C--