From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNqKr-0002hp-E9 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:28:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNqKp-0007qU-SV for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:28:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNqKp-0007qC-K4 for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:28:19 -0400 Message-ID: <507C63CB.7090006@redhat.com> Date: Mon, 15 Oct 2012 13:28:11 -0600 From: Eric Blake MIME-Version: 1.0 References: <507C50E9.1050706@redhat.com> <507C51B6.1010803@redhat.com> <7C9D50488E80F46BDF7A16DA@Ximines.local> In-Reply-To: <7C9D50488E80F46BDF7A16DA@Ximines.local> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig07EBF5DF096FB197100EF877" 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: , To: Alex Bligh Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig07EBF5DF096FB197100EF877 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 10/15/2012 12:42 PM, Alex Bligh wrote: > Eric, >=20 > --On 15 October 2012 12:11:02 -0600 Eric Blake wrot= e: >=20 >> 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 pu= ll >> the entire chain into the destination and leave no backing file. >=20 > Yes, that's exactly the case we're missing. How about the attached (as > a single patch) >=20 > Also available at: > https://github.com/abligh/qemu > as commits > https://github.com/abligh/qemu/commit/4cce9c961fa52a71bd6520a9c499f4dc= 4b174b97 >=20 > and > https://github.com/abligh/qemu/commit/4d5b3b431d8dd276f4c564d8a82c6d25= cb111381 >=20 >=20 > --=20 > Alex Bligh Missing a Signed-off-by; as such, it cannot be taken as is. Please repost, and provide an updated subject line and a dedicated commit message (information such as where to download the commit for testing belongs after the --- line). I'm not maintainer for this portion of code, so I can only review it. > @@ -1580,7 +1581,7 @@ static int img_rebase(int argc, char **argv) > if (!unsafe) { > uint64_t num_sectors; > uint64_t old_backing_num_sectors; > - uint64_t new_backing_num_sectors; > + uint64_t new_backing_num_sectors=3D0; As long as you are touching this line, fix the indentation to be consistent (or is this unusual spacing an artifact of how you pasted your commit after your '-- ' signature rather than submitting it via 'git send-email' as a proper patch?). Also, most of qemu uses spaces on both sides of '=3D'. But the overall idea looks nice. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig07EBF5DF096FB197100EF877 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/ iQEcBAEBCAAGBQJQfGPMAAoJEKeha0olJ0NqhkgIAIV7EIage/RGva6V4Vl+v13m Ny9R9h+1xGXrtVIKQL3mXlORVkoKQEV32TM0N1KDS5ARZHGpFVcEpOsO8CyPd52p OZ4UWwlhRCGjsBUlANYHfbVyaELSmMTMFC7jgL/k3fWK1ghgXp5n//+uK3eAvh9A 5KCDelKD6Cey8kmVYffwB4pim1KYGqYbpxAgzIpId/ZVh/yPGU7xjGQiAN6DvUKL pTpNhhyVqVhxsjr5KPDsZyWARdJ/q27rOYaeLyoQYy7gWqhI9UnCs9JcHB04ZCkA z8OADsVdMe/n7NnrR/i/beVxGI5XjTqJ+HAS3zNOnvROIrhZLUKv08RyjecHTu4= =1NZM -----END PGP SIGNATURE----- --------------enig07EBF5DF096FB197100EF877--