From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNrsh-0006u3-Du for qemu-devel@nongnu.org; Mon, 15 Oct 2012 17:07:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNrsf-0004Ei-Rm for qemu-devel@nongnu.org; Mon, 15 Oct 2012 17:07:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNrsf-0004Ed-IC for qemu-devel@nongnu.org; Mon, 15 Oct 2012 17:07:21 -0400 Message-ID: <507C7B06.9070702@redhat.com> Date: Mon, 15 Oct 2012 15:07:18 -0600 From: Eric Blake MIME-Version: 1.0 References: <1350192655-19706-1-git-send-email-kashyap.cv@gmail.com> In-Reply-To: <1350192655-19706-1-git-send-email-kashyap.cv@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA3D584012DFA5CE6B0F77AEC" Subject: Re: [Qemu-devel] qemu-img: document 'info --backing-chain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kashyap Chamarthy Cc: Kevin Wolf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA3D584012DFA5CE6B0F77AEC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 10/13/2012 11:30 PM, Kashyap Chamarthy wrote: >>>From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001 > From: Kashyap Chamarthy > Date: Sun, 14 Oct 2012 09:51:18 +0530 > Subject: [PATCH v2] qemu-img: document 'info --backing-chain' >=20 > Signed-off-by: Kashyap Chamarthy > --- > qemu-img-cmds.hx | 4 ++-- > qemu-img.texi | 19 ++++++++++++++++++- > 2 files changed, 20 insertions(+), 3 deletions(-) Per http://wiki.qemu.org/Contribute/SubmitAPatch, it helps to add a maintainer in cc; I'm guessing that this is most closely related to block work, and therefore adding Kevin in cc. Reviewed-by: Eric Blake Also, it helps to call out your specific pre-requisite; this only makes sense after Stefan's patches: https://lists.gnu.org/archive/html/qemu-devel/2012-10/msg02527.html >=20 > diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx > index 0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f= 1b9ef89603e89edc0 100644 > --- a/qemu-img-cmds.hx > +++ b/qemu-img-cmds.hx > @@ -34,9 +34,9 @@ STEXI > ETEXI > =20 > DEF("info", img_info, > - "info [-f fmt] [--output=3Dofmt] filename") > + "info [-f fmt] [--output=3Dofmt] [--backing-chain] filename") > STEXI > -@item info [-f @var{fmt}] [--output=3D@var{ofmt}] @var{filename} > +@item info [-f @var{fmt}] [--output=3D@var{ofmt}] [--backing-chain] @v= ar{filename} > ETEXI > =20 > DEF("snapshot", img_snapshot, > diff --git a/qemu-img.texi b/qemu-img.texi > index 8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88= 376acd5267ad96c3c 100644 > --- a/qemu-img.texi > +++ b/qemu-img.texi > @@ -28,6 +28,10 @@ Command parameters: > is the disk image format. It is guessed automatically in most cases. S= ee below > for a description of the supported disk formats. > =20 > +@item --backing-chain=20 > +will enumerate information about backing files in a disk image chain. = Refer > +below for further description. > + > @item size > is the disk image size in bytes. Optional suffixes @code{k} or @code{K= } > (kilobyte, 1024) @code{M} (megabyte, 1024k) and @code{G} (gigabyte, 10= 24M) > @@ -129,7 +133,7 @@ created as a copy on write image of the specified b= ase image; the > @var{backing_file} should have the same content as the input's base im= age, > however the path, image format, etc may differ. > =20 > -@item info [-f @var{fmt}] [--output=3D@var{ofmt}] @var{filename} > +@item info [-f @var{fmt}] [--output=3D@var{ofmt}] [--backing-chain] @v= ar{filename} > =20 > Give information about the disk image @var{filename}. Use it in > particular to know the size reserved on disk which can be different > @@ -137,6 +141,19 @@ from the displayed size. If VM snapshots are store= d in the disk image, > they are displayed too. The command can output in the format @var{ofmt= } > which is either @code{human} or @code{json}. > =20 > +If a disk image has a backing file chain, information about each disk = image in > +the chain can be recursively enumerated by using the option @code{--ba= cking-chain}. > + > +For instance, if you have an image chain like:=20 > + > + base.qcow2 <- snap1.qcow2 <- snap2.qcow2=20 > + > +To enumerate information about each disk image in the above chain, sta= rting from top to base, do: > + =20 > + @example > + qemu-img info --backing-chain snap2.qcow2 > + @end example > + > @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{s= napshot} ] @var{filename} > =20 > List, apply, create or delete snapshots in image @var{filename}. >=20 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigA3D584012DFA5CE6B0F77AEC 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/ iQEcBAEBCAAGBQJQfHsGAAoJEKeha0olJ0NqB2QH/jtVsP7znj3vbc+MUWB+z1km hGIGL4Tc/266zgo1smEaVPmFuPksdOQL1N18ejT45DiYn57IMGktfNmk2epM7tvE TihCenFiJdYriFyLIMeE8u3Ib7XydyCa4436hvIJqvoTQBrjtt6azH525QlCEbgq XpJ1qknaNZQv0Az3lb+2WI2nR1CAHxajHXjSF2JTZ9mtcPqnXWaGGRv5lchDQf5f OrlyNFKQoUEC/VtLIsXJSi1rQLn+zuugJ8gonL+lMcTpj5udu1u3sMX0nstjVPHA 22yHmpm+EVQ9M0lKpxXbvCRDSmp2DiLC85MXthmX0K6Y6DcaYto83GA0tdr7zIk= =YClC -----END PGP SIGNATURE----- --------------enigA3D584012DFA5CE6B0F77AEC--