From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWTFu-00012F-MD for qemu-devel@nongnu.org; Mon, 21 May 2012 10:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWTFp-0005Yt-Td for qemu-devel@nongnu.org; Mon, 21 May 2012 10:06:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWTFp-0005Yb-La for qemu-devel@nongnu.org; Mon, 21 May 2012 10:06:33 -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 q4LE6Wgg019270 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 21 May 2012 10:06:32 -0400 Message-ID: <4FBA4BE5.2020805@redhat.com> Date: Mon, 21 May 2012 16:06:29 +0200 From: Kevin Wolf 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: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: qemu-devel@nongnu.org Am 21.05.2012 15:59, schrieb Richard W.M. Jones: > On Mon, May 21, 2012 at 03:29:22PM +0200, Kevin Wolf wrote: >> Am 17.05.2012 17:34, schrieb Richard W.M. Jones: >>> From: "Richard W.M. Jones" >>> >>> This produces a qcow2 file which is the difference between >>> two disk images. ie, if: >>> >>> base.img - is a disk image (in any format) >>> modified.img - is base.img, copied and modified >>> >>> then: >>> >>> qemu-img diff -b base.img modified.img diff.qcow2 >>> >>> creates 'diff.qcow2' which contains the differences between 'base.img= ' >>> and 'modified.img'. Note that 'diff.qcow2' has 'base.img' as its >>> backing file. >>> >>> Signed-off-by: Richard W.M. Jones >>> Cc: Matthew Booth >>> Cc: Pablo Iranzo G=F3mez >>> Cc: Tomas Von Veschler >> >> 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 >> >> Or is there some detail that I'm missing? If it is equivalent, this >> would suggest that either the new command isn't necessary at all or at >> least that it should reuse the qemu-img rebase code. >=20 > 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? Looks good to me. As it already has a SoB, I've applied it to the block branch. Let me know if I should dequeue it again. Kevin