From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWUZB-0001g0-Ox for qemu-devel@nongnu.org; Mon, 21 May 2012 11:30:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWUZ9-0004qn-Om for qemu-devel@nongnu.org; Mon, 21 May 2012 11:30:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWUZ9-0004qH-Gy for qemu-devel@nongnu.org; Mon, 21 May 2012 11:30:35 -0400 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 q4LFUXi6002083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 May 2012 11:30:33 -0400 Message-ID: <4FBA5F95.9010105@redhat.com> Date: Mon, 21 May 2012 09:30:29 -0600 From: Eric Blake MIME-Version: 1.0 References: <1337268840-4779-1-git-send-email-rjones@redhat.com> <4FBA4332.6050201@redhat.com> <20120521135926.GM15276@amd.home.annexia.org> In-Reply-To: <20120521135926.GM15276@amd.home.annexia.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig4FA9274E2F3DA9A2FABA33DF" Subject: Re: [Qemu-devel] [PATCH v3] qemu-img: Implement 'diff' operation. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: Kevin Wolf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4FA9274E2F3DA9A2FABA33DF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 05/21/2012 07:59 AM, Richard W.M. Jones wrote: >> >> Hm, I'm wondering... If I have a command line like this: >> >> qemu-img diff -b base.img modified.img diff.qcow2 >> >> Would this be equivalent to this sequence? >> >> qemu-img create -f qcow2 -b modified.img diff.qcow2 >> qemu-img rebase -b base.img diff.qcow2 So 'qemu-img rebase' is able to rebase to any other image, even if base.img is nowhere in the backing chain of modified.img? That means it is more powerful than runtime 'block-stream' monitor command under qemu, which can only do a block pull from an earlier point in the backing chain= =2E > Yes. I tried for a while to work out the sequence of commands that > could make a diff using 'qemu-img rebase', but it wasn't obvious and I > gave up. It should at least be documented. How about the attached > patch? Seems reasonable to me. A two-command sequence of qemu-img to manipulate offline images isn't all that bad; it's different from the case of a disk image in active use by qemu. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig4FA9274E2F3DA9A2FABA33DF 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://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPul+WAAoJEKeha0olJ0NqwDMH/iYAC7WieiLQTUO/CR28nKNB 9ngU0xLn7eND65eqMrZcHjMenZE/Q0Ztf9HiG/spgRcnIW85YovZuJDjTB1QDIs1 tlQf3n+9Uf7FT9zeUHIzGXUpzsVsndMfZ/1nSmLelThl4gGllT6RBJl+qjbwriSm qzZMziNvRNk8DJ/SJGO54UDrwBaA3NgLbQAF9oBdiJ3HtJ435QzkroSlHnhgOUcX dDeKFl0KMTS4hJQlSax3Jg/V8opfrJVVGoIlaYBARxAGp70f00UzThYh0UtZ8Nw0 zW/oh4X0R9MzlWJU0+pBZhfJtB2QlQCOHPeW5M9XVO+autqZdlo6WRTTaabd69A= =SwKc -----END PGP SIGNATURE----- --------------enig4FA9274E2F3DA9A2FABA33DF--