* [Qemu-devel] [PATCH]Re: qemu-img: document 'info --backing-chain
2012-10-14 5:30 [Qemu-devel] qemu-img: document 'info --backing-chain Kashyap Chamarthy
@ 2012-10-14 6:21 ` Kashyap Chamarthy
2012-10-15 9:01 ` [Qemu-devel] " Stefan Hajnoczi
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Kashyap Chamarthy @ 2012-10-14 6:21 UTC (permalink / raw)
To: qemu-devel; +Cc: Kashyap Chamarthy
Sorry, forgot to add [PATCH] in the subject.
/kashyap
On Sun, Oct 14, 2012 at 11:00 AM, Kashyap Chamarthy
<kashyap.cv@gmail.com> wrote:
> From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
> From: Kashyap Chamarthy <kashyap.cv@gmail.com>
> Date: Sun, 14 Oct 2012 09:51:18 +0530
> Subject: [PATCH v2] qemu-img: document 'info --backing-chain'
>
> Signed-off-by: Kashyap Chamarthy <kashyap.cv@gmail.com>
> ---
> qemu-img-cmds.hx | 4 ++--
> qemu-img.texi | 19 ++++++++++++++++++-
> 2 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
> index 0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f1b9ef89603e89edc0 100644
> --- a/qemu-img-cmds.hx
> +++ b/qemu-img-cmds.hx
> @@ -34,9 +34,9 @@ STEXI
> ETEXI
>
> DEF("info", img_info,
> - "info [-f fmt] [--output=ofmt] filename")
> + "info [-f fmt] [--output=ofmt] [--backing-chain] filename")
> STEXI
> -@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename}
> +@item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain] @var{filename}
> ETEXI
>
> DEF("snapshot", img_snapshot,
> diff --git a/qemu-img.texi b/qemu-img.texi
> index 8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88376acd5267ad96c3c 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. See below
> for a description of the supported disk formats.
>
> +@item --backing-chain
> +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, 1024M)
> @@ -129,7 +133,7 @@ created as a copy on write image of the specified base image; the
> @var{backing_file} should have the same content as the input's base image,
> however the path, image format, etc may differ.
>
> -@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename}
> +@item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain] @var{filename}
>
> 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 stored 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}.
>
> +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{--backing-chain}.
> +
> +For instance, if you have an image chain like:
> +
> + base.qcow2 <- snap1.qcow2 <- snap2.qcow2
> +
> +To enumerate information about each disk image in the above chain, starting from top to base, do:
> +
> + @example
> + qemu-img info --backing-chain snap2.qcow2
> + @end example
> +
> @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
>
> List, apply, create or delete snapshots in image @var{filename}.
> --
> 1.7.12.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu-img: document 'info --backing-chain
2012-10-14 5:30 [Qemu-devel] qemu-img: document 'info --backing-chain Kashyap Chamarthy
2012-10-14 6:21 ` [Qemu-devel] [PATCH]Re: " Kashyap Chamarthy
@ 2012-10-15 9:01 ` Stefan Hajnoczi
2012-10-15 21:07 ` Eric Blake
2012-10-17 15:33 ` Kevin Wolf
3 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2012-10-15 9:01 UTC (permalink / raw)
To: Kashyap Chamarthy; +Cc: qemu-devel
On Sun, Oct 14, 2012 at 11:00:55AM +0530, Kashyap Chamarthy wrote:
> From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
> From: Kashyap Chamarthy <kashyap.cv@gmail.com>
> Date: Sun, 14 Oct 2012 09:51:18 +0530
> Subject: [PATCH v2] qemu-img: document 'info --backing-chain'
>
> Signed-off-by: Kashyap Chamarthy <kashyap.cv@gmail.com>
> ---
> qemu-img-cmds.hx | 4 ++--
> qemu-img.texi | 19 ++++++++++++++++++-
> 2 files changed, 20 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu-img: document 'info --backing-chain
2012-10-14 5:30 [Qemu-devel] qemu-img: document 'info --backing-chain Kashyap Chamarthy
2012-10-14 6:21 ` [Qemu-devel] [PATCH]Re: " Kashyap Chamarthy
2012-10-15 9:01 ` [Qemu-devel] " Stefan Hajnoczi
@ 2012-10-15 21:07 ` Eric Blake
2012-10-16 3:10 ` Kashyap Chamarthy
2012-10-17 15:33 ` Kevin Wolf
3 siblings, 1 reply; 6+ messages in thread
From: Eric Blake @ 2012-10-15 21:07 UTC (permalink / raw)
To: Kashyap Chamarthy; +Cc: Kevin Wolf, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 3715 bytes --]
On 10/13/2012 11:30 PM, Kashyap Chamarthy wrote:
>>From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
> From: Kashyap Chamarthy <kashyap.cv@gmail.com>
> Date: Sun, 14 Oct 2012 09:51:18 +0530
> Subject: [PATCH v2] qemu-img: document 'info --backing-chain'
>
> Signed-off-by: Kashyap Chamarthy <kashyap.cv@gmail.com>
> ---
> 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 <eblake@redhat.com>
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
>
> diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
> index 0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f1b9ef89603e89edc0 100644
> --- a/qemu-img-cmds.hx
> +++ b/qemu-img-cmds.hx
> @@ -34,9 +34,9 @@ STEXI
> ETEXI
>
> DEF("info", img_info,
> - "info [-f fmt] [--output=ofmt] filename")
> + "info [-f fmt] [--output=ofmt] [--backing-chain] filename")
> STEXI
> -@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename}
> +@item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain] @var{filename}
> ETEXI
>
> DEF("snapshot", img_snapshot,
> diff --git a/qemu-img.texi b/qemu-img.texi
> index 8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88376acd5267ad96c3c 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. See below
> for a description of the supported disk formats.
>
> +@item --backing-chain
> +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, 1024M)
> @@ -129,7 +133,7 @@ created as a copy on write image of the specified base image; the
> @var{backing_file} should have the same content as the input's base image,
> however the path, image format, etc may differ.
>
> -@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename}
> +@item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain] @var{filename}
>
> 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 stored 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}.
>
> +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{--backing-chain}.
> +
> +For instance, if you have an image chain like:
> +
> + base.qcow2 <- snap1.qcow2 <- snap2.qcow2
> +
> +To enumerate information about each disk image in the above chain, starting from top to base, do:
> +
> + @example
> + qemu-img info --backing-chain snap2.qcow2
> + @end example
> +
> @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
>
> List, apply, create or delete snapshots in image @var{filename}.
>
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 617 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu-img: document 'info --backing-chain
2012-10-15 21:07 ` Eric Blake
@ 2012-10-16 3:10 ` Kashyap Chamarthy
0 siblings, 0 replies; 6+ messages in thread
From: Kashyap Chamarthy @ 2012-10-16 3:10 UTC (permalink / raw)
To: Eric Blake; +Cc: Kevin Wolf, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 3949 bytes --]
On Tue, Oct 16, 2012 at 2:37 AM, Eric Blake <eblake@redhat.com> wrote:
> On 10/13/2012 11:30 PM, Kashyap Chamarthy wrote:
> >>From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
> > From: Kashyap Chamarthy <kashyap.cv@gmail.com>
> > Date: Sun, 14 Oct 2012 09:51:18 +0530
> > Subject: [PATCH v2] qemu-img: document 'info --backing-chain'
> >
> > Signed-off-by: Kashyap Chamarthy <kashyap.cv@gmail.com>
> > ---
> > 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.
>
Will keep this in mind.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> 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
>
>
Thank you for your detail.
/kashyap
> >
> > diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
> > index
> 0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f1b9ef89603e89edc0
> 100644
> > --- a/qemu-img-cmds.hx
> > +++ b/qemu-img-cmds.hx
> > @@ -34,9 +34,9 @@ STEXI
> > ETEXI
> >
> > DEF("info", img_info,
> > - "info [-f fmt] [--output=ofmt] filename")
> > + "info [-f fmt] [--output=ofmt] [--backing-chain] filename")
> > STEXI
> > -@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename}
> > +@item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain]
> @var{filename}
> > ETEXI
> >
> > DEF("snapshot", img_snapshot,
> > diff --git a/qemu-img.texi b/qemu-img.texi
> > index
> 8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88376acd5267ad96c3c
> 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.
> See below
> > for a description of the supported disk formats.
> >
> > +@item --backing-chain
> > +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,
> 1024M)
> > @@ -129,7 +133,7 @@ created as a copy on write image of the specified
> base image; the
> > @var{backing_file} should have the same content as the input's base
> image,
> > however the path, image format, etc may differ.
> >
> > -@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename}
> > +@item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain]
> @var{filename}
> >
> > 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 stored
> 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}.
> >
> > +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{--backing-chain}.
> > +
> > +For instance, if you have an image chain like:
> > +
> > + base.qcow2 <- snap1.qcow2 <- snap2.qcow2
> > +
> > +To enumerate information about each disk image in the above chain,
> starting from top to base, do:
> > +
> > + @example
> > + qemu-img info --backing-chain snap2.qcow2
> > + @end example
> > +
> > @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d
> @var{snapshot} ] @var{filename}
> >
> > List, apply, create or delete snapshots in image @var{filename}.
> >
>
> --
> Eric Blake eblake@redhat.com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>
[-- Attachment #2: Type: text/html, Size: 5529 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] qemu-img: document 'info --backing-chain
2012-10-14 5:30 [Qemu-devel] qemu-img: document 'info --backing-chain Kashyap Chamarthy
` (2 preceding siblings ...)
2012-10-15 21:07 ` Eric Blake
@ 2012-10-17 15:33 ` Kevin Wolf
3 siblings, 0 replies; 6+ messages in thread
From: Kevin Wolf @ 2012-10-17 15:33 UTC (permalink / raw)
To: Kashyap Chamarthy; +Cc: qemu-devel
Am 14.10.2012 07:30, schrieb Kashyap Chamarthy:
> From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
> From: Kashyap Chamarthy <kashyap.cv@gmail.com>
> Date: Sun, 14 Oct 2012 09:51:18 +0530
> Subject: [PATCH v2] qemu-img: document 'info --backing-chain'
>
> Signed-off-by: Kashyap Chamarthy <kashyap.cv@gmail.com>
> @@ -137,6 +141,19 @@ from the displayed size. If VM snapshots are stored 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}.
>
> +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{--backing-chain}.
> +
> +For instance, if you have an image chain like:
> +
> + base.qcow2 <- snap1.qcow2 <- snap2.qcow2
> +
> +To enumerate information about each disk image in the above chain, starting from top to base, do:
> +
> + @example
> + qemu-img info --backing-chain snap2.qcow2
> + @end example
> +
> @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
>
> List, apply, create or delete snapshots in image @var{filename}.
For me, this is rendered as:
For instance, if you have an image chain like:
base.qcow2 E<lt>- snap1.qcow2 E<lt>- snap2.qcow2
To enumerate information about each disk image in the above
chain, starting from top to base, do:
@example
qemu-img info --backing-chain snap2.qcow2
@end example
That is, the arrows aren't quite right and @example is included
literally. Please fix and resubmit.
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread