Skip to contentSkip to conversation

qemu-img: document 'info --backing-chain

Qemu-devel Kashyap Chamarthy 4 participants 6 messages Oct 14, 2012 – Oct 17, 2012

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001

From: Kashyap Chamarthy <[email protected]>
Date: Sun, 14 Oct 2012 09:51:18 +0530
Subject: [PATCH v2] qemu-img: document 'info --backing-chain'

---
 qemu-img-cmds.hx |  4 ++--
 qemu-img.texi    | 19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)
qemu-img-cmds.hx +2 -2
index 0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f1b9ef89603e89edc0 100644
@@ -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,
qemu-img.texi +18 -1
index 8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88376acd5267ad96c3c 100644
@@ -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}.
Signature · 1 line
1.7.12.1
#1 lore raw

Sorry, forgot to add [PATCH] in the subject.

/kashyap

Quoted 74 lines · Kashyap Chamarthy

From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
From: Kashyap Chamarthy <[email protected]>
Date: Sun, 14 Oct 2012 09:51:18 +0530
Subject: [PATCH v2] qemu-img: document 'info --backing-chain'

---
 qemu-img-cmds.hx |  4 ++--
 qemu-img.texi    | 19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)
qemu-img-cmds.hx +2 -2
index 0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f1b9ef89603e89edc0 100644
@@ -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,
qemu-img.texi +18 -2
index 8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88376acd5267ad96c3c 100644
@@ -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

Reviewed-by
#2 lore raw
In reply to Kashyap Chamarthy
Quoted 10 lines · Kashyap Chamarthy

From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
From: Kashyap Chamarthy <[email protected]>
Date: Sun, 14 Oct 2012 09:51:18 +0530
Subject: [PATCH v2] qemu-img: document 'info --backing-chain'

---
 qemu-img-cmds.hx |  4 ++--
 qemu-img.texi    | 19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)
Reviewed-by
#3 lore raw
In reply to Kashyap Chamarthy
Quoted 10 lines · Kashyap Chamarthy
Quoted 1 line

From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001

From: Kashyap Chamarthy <[email protected]>
Date: Sun, 14 Oct 2012 09:51:18 +0530
Subject: [PATCH v2] qemu-img: document 'info --backing-chain'

---
 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.

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

Quoted 62 lines
qemu-img-cmds.hx +2 -2
index 0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f1b9ef89603e89edc0 100644
@@ -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,
qemu-img.texi +18 -1
index 8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88376acd5267ad96c3c 100644
@@ -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}.
Signature · 2 lines
Eric Blake   [email protected]    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#4 lore raw
Quoted 12 lines · Eric Blake
Quoted 10 lines · Kashyap Chamarthy
Quoted 1 line

From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001

From: Kashyap Chamarthy <[email protected]>
Date: Sun, 14 Oct 2012 09:51:18 +0530
Subject: [PATCH v2] qemu-img: document 'info --backing-chain'

---
 qemu-img-cmds.hx |  4 ++--
 qemu-img.texi    | 19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)
Quoted 4 lines

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.

Quoted 8 lines

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

Quoted 84 lines
Quoted 3 lines
qemu-img-cmds.hx +0 -0

index

0ef82e9ac7a89d607e1f2c8e38461cee5b438dba..a18136302d2ca7a7540672f1b9ef89603e89edc0 100644

qemu-img-cmds.hx STEXI · line 39

Quoted 11 lines
qemu-img-cmds.hx +2 -2
@@ -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}

Quoted 5 lines
qemu-img-cmds.hx +0 -0
 ETEXI
 
 DEF("snapshot", img_snapshot,
qemu-img.texi +0 -0

index

8b05f2c42801a2535ab4390b47bc415eb880625a..ffd334dc7b049c50474be88376acd5267ad96c3c 100644

qemu-img.texi Command parameters: · line 28

Quoted 4 lines
qemu-img.texi +0 -0
@@ -28,6 +28,10 @@ Command parameters:
 is the disk image format. It is guessed automatically in most cases.

See below

qemu-img.texi Command parameters:

Quoted 4 lines
qemu-img.texi +2 -0
 for a description of the supported disk formats.
 
+@item --backing-chain
+will enumerate information about backing files in a disk image chain.

Refer

qemu-img.texi Command parameters:

Quoted 5 lines
qemu-img.texi +2 -0
+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)

qemu-img.texi created as a copy on write image of the specified

Quoted 1 line
qemu-img.texi +0 -0
@@ -129,7 +133,7 @@ created as a copy on write image of the specified

base image; the

qemu-img.texi created as a copy on write image of the specified · line 133

Quoted 1 line
qemu-img.texi +0 -0
 @var{backing_file} should have the same content as the input's base

image,

qemu-img.texi created as a copy on write image of the specified base image; the

Quoted 4 lines
qemu-img.texi +1 -1
 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}

qemu-img.texi from the displayed size. If VM snapshots are stored

Quoted 4 lines
qemu-img.texi +0 -0
 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,

qemu-img.texi from the displayed size. If VM snapshots are stored in the disk image,

Quoted 4 lines
qemu-img.texi +1 -0
 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

qemu-img.texi from the displayed size. If VM snapshots are stored · line 145

Quoted 1 line
qemu-img.texi +1 -0
+the chain can be recursively enumerated by using the option

@code{--backing-chain}.

qemu-img.texi from the displayed size. If VM snapshots are stored in the disk image,

Quoted 6 lines
qemu-img.texi +6 -0
+
+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:

qemu-img.texi from the displayed size. If VM snapshots are stored in the disk image,

Quoted 6 lines
qemu-img.texi +5 -0
+
+    @example
+    qemu-img info --backing-chain snap2.qcow2
+    @end example
+
 @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d

@var{snapshot} ] @var{filename}

qemu-img.texi from the displayed size. If VM snapshots are stored · line 159

Quoted 3 lines
qemu-img.texi +0 -0
 List, apply, create or delete snapshots in image @var{filename}.
 

--
Eric Blake [email protected] +1-919-301-3266
Libvirt virtualization library http://libvirt.org

#5 lore raw
In reply to Kashyap Chamarthy

Am 14.10.2012 07:30, schrieb Kashyap Chamarthy:

Quoted 17 lines

From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001
From: Kashyap Chamarthy <[email protected]>
Date: Sun, 14 Oct 2012 09:51:18 +0530
Subject: [PATCH v2] qemu-img: document 'info --backing-chain'

qemu-img.texi +6 -0
@@ -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 

qemu-img.texi from the displayed size. If VM snapshots are stored in the disk image, · line 159

Quoted 10 lines
qemu-img.texi +7 -0
+
+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