From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNrXB-0005z6-R6 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 16:45:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNrXA-00070H-8D for qemu-devel@nongnu.org; Mon, 15 Oct 2012 16:45:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNrX9-0006xy-VX for qemu-devel@nongnu.org; Mon, 15 Oct 2012 16:45:08 -0400 Message-ID: <507C75CB.2090006@redhat.com> Date: Mon, 15 Oct 2012 14:44:59 -0600 From: Eric Blake MIME-Version: 1.0 References: <1350332607-31177-1-git-send-email-alex@alex.org.uk> In-Reply-To: <1350332607-31177-1-git-send-email-alex@alex.org.uk> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig15012D1B861C867253B1A050" Subject: Re: [Qemu-devel] [PATCH] qemu-img rebase: allow empty file name as new backing file to mean rebase with no backing file [attempt 2] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig15012D1B861C867253B1A050 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/15/2012 02:23 PM, Alex Bligh wrote: Rather long on the subject line; 'git shortlog -30' will give you a taste for typical commit summary length. Also, you will usually see [PATCHv2] as the prefix, rather than [PATCH]...[attempt 2] as a suffix, since 'git am' only strips a [] prefix. It might be better as: qemu-img rebase: use empty string to rebase without backing file > This patch allows an empty filename to be passed as the new base image = name > for qemu-img rebase to mean base the image on no backing file (i.e. > independent of any backing file). According to Eric Blake, qemu-imag re= base s/qemu-imag/qemu-img/ > already supports this when '-u' is used; this adds support when -u is n= ot > used. >=20 > Signed-off-by: Alex Bligh > --- > @@ -1675,7 +1677,11 @@ static int img_rebase(int argc, char **argv) > * backing file are overwritten in the COW file now, so the visibl= e content > * doesn't change when we switch the backing file. > */ > - ret =3D bdrv_change_backing_file(bs, out_baseimg, out_basefmt); > + if (bs_new_backing) > + ret =3D bdrv_change_backing_file(bs, out_baseimg, out_basefmt)= ; > + else > + ret =3D bdrv_change_backing_file(bs, NULL, NULL); Should we error out if the user specifies basefmt but gives the empty string, instead of silently ignoring the bogus basefmt? But that's bikeshedding, I can live with what you wrote. Reviewed-by: Eric Blake --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig15012D1B861C867253B1A050 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/ iQEcBAEBCAAGBQJQfHXLAAoJEKeha0olJ0NqjR8H/15c97bFpMFx+gEitTRcJSUq GHV1W/eyrMCR7DA6bHEFeUgzUVKncCdU+Rx4SrHn0B0szT1tLZkCpL0ykQaPPy+Y pOOJ/xQgMpLpAImQ+0SQj52v0ec4sEdHoCdOAeZ+ATO5oTE/kCHsHXj9XArgs7ct TQC0WtTosZe6edlIzd4kqt19QECfXog3/MlK/Zjq8f8BIpzU6SujrofQPo7fRP3L 2Ei1YVSTCD2KbCw/+uTdn6nlWfXA81BDBccyrJqg2Rrj9o2GSPbiaEAdu+TPB6Jw fUUQisyF+MTeRKxlXiIGRu6DrWB7xqhsV2N8lUv5VYCBesIZ4INksUsVZSeffq8= =bWl3 -----END PGP SIGNATURE----- --------------enig15012D1B861C867253B1A050--