qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Cc: kwolf@redhat.com, phrdina@redhat.com, qemu-devel@nongnu.org,
	armbru@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH V13 0/6] enhancement for qmp/hmp interfaces of block info
Date: Wed, 5 Jun 2013 13:07:28 +0200	[thread overview]
Message-ID: <20130605110728.GC30326@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <1369455886-30677-1-git-send-email-xiawenc@linux.vnet.ibm.com>

On Sat, May 25, 2013 at 12:24:40PM +0800, Wenchao Xia wrote:
>   This serial let qmp interface show delaied info, including internal snapshot
> /backing chain on all block device at runtime, which helps management stack and
> human user, by retrieving exactly the same info of what qemu saws.
> 
> Example:
> -> { "execute": "query-block" }
> <- {
>       "return":[
>          {
>             "io-status": "ok",
>             "device":"ide0-hd0",
>             "locked":false,
>             "removable":false,
>             "inserted":{
>                "ro":false,
>                "drv":"qcow2",
>                "encrypted":false,
>                "file":"disks/test.qcow2",
>                "backing_file_depth":1,
>                "bps":1000000,
>                "bps_rd":0,
>                "bps_wr":0,
>                "iops":1000000,
>                "iops_rd":0,
>                "iops_wr":0,
>                "image":{
>                   "filename":"disks/test.qcow2",
>                   "format":"qcow2",
>                   "virtual-size":2048000,
>                   "backing_file":"base.qcow2",
>                   "full-backing-filename":"disks/base.qcow2",
>                   "backing-filename-format:"qcow2",
>                   "snapshots":[
>                      {
>                         "id": "1",
>                         "name": "snapshot1",
>                         "vm-state-size": 0,
>                         "date-sec": 10000200,
>                         "date-nsec": 12,
>                         "vm-clock-sec": 206,
>                         "vm-clock-nsec": 30
>                      }
>                   ],
>                   "backing-image":{
>                       "filename":"disks/base.qcow2",
>                       "format":"qcow2",
>                       "virtual-size":2048000
>                   }
>                }
>             },
>             "type":"unknown"
>          },
>          {
>             "io-status": "ok",
>             "device":"ide1-cd0",
>             "locked":false,
>             "removable":true,
>             "type":"unknown"
>          },
>          {
>             "device":"floppy0",
>             "locked":false,
>             "removable":true,
>             "type":"unknown"
>          },
>          {
>             "device":"sd0",
>             "locked":false,
>             "removable":true,
>             "type":"unknown"
>          }
>       ]
>    }
> 
>   These patches follows the rule that use qmp to retieve information,
> hmp layer just does a translation from qmp object it got. To make code
> graceful, snapshot and image info retrieving code in qemu and qemu-img are
> merged into block layer, and some function name was adjusted to make it tips
> better. For the part touch by the serial, it works as:
> 
>    qemu          qemu-img
> 
> dump_monitor    dump_stdout
>      |--------------| 
>             |
>        block/qapi.c
> 
>   Special thanks for Markus, Stefan, Kevin, Eric reviewing many times.
> 
> v13:
>   Renamed the serial as "enhancement for qmp/hmp interfaces of block info".
>   Seperated the common part of code moving and hmp printf as a standalone
> serial, which can be used by both mine and Pavel's work. This serial depend
> on it: "[PATCH V3 0/4] qapi and snapshot code clean up in block layer",
> https://lists.gnu.org/archive/html/qemu-devel/2013-05/msg03539.html
>   Removed the VM snapshot info part, since it relate to VM snapshot creating
> logic, which should be changed together with Pavel's serial.
>   Address Eric's comments:
>   2/6: bdrv_query_image_info() returns void now, only use *errp to tip error.
> 
> Wenchao Xia (6):
>   1 block: add snapshot info query function bdrv_query_snapshot_info_list()
>   2 block: add image info query function bdrv_query_image_info()
>   3 qmp: add recursive member in ImageInfo
>   4 qmp: add ImageInfo in BlockDeviceInfo used by query-block
>   5 hmp: show ImageInfo in 'info block'
>   6 hmp: add parameters device and -v for info block
> 
>  block/qapi.c         |  148 ++++++++++++++++++++++++++++++++++++++++++--------
>  hmp.c                |   21 +++++++
>  include/block/qapi.h |   14 +++--
>  monitor.c            |    7 ++-
>  qapi-schema.json     |   10 +++-
>  qemu-img.c           |   10 +++-
>  qmp-commands.hx      |   69 +++++++++++++++++++++++-
>  7 files changed, 242 insertions(+), 37 deletions(-)

I left comments but overall this looks very close to merge now.

      parent reply	other threads:[~2013-06-05 11:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25  4:24 [Qemu-devel] [PATCH V13 0/6] enhancement for qmp/hmp interfaces of block info Wenchao Xia
2013-05-25  4:24 ` [Qemu-devel] [PATCH V13 1/6] block: add snapshot info query function bdrv_query_snapshot_info_list() Wenchao Xia
2013-05-25  4:24 ` [Qemu-devel] [PATCH V13 2/6] block: add image info query function bdrv_query_image_info() Wenchao Xia
2013-05-25 12:50   ` Eric Blake
2013-05-25  4:24 ` [Qemu-devel] [PATCH V13 3/6] qmp: add recursive member in ImageInfo Wenchao Xia
2013-05-25 16:10   ` Eric Blake
2013-05-27  1:28     ` Wenchao Xia
2013-06-05 10:56       ` Stefan Hajnoczi
2013-05-25  4:24 ` [Qemu-devel] [PATCH V13 4/6] qmp: add ImageInfo in BlockDeviceInfo used by query-block Wenchao Xia
2013-05-25  4:24 ` [Qemu-devel] [PATCH V13 5/6] hmp: show ImageInfo in 'info block' Wenchao Xia
2013-05-25  4:24 ` [Qemu-devel] [PATCH V13 6/6] hmp: add parameters device and -v for info block Wenchao Xia
2013-06-05 11:06   ` Stefan Hajnoczi
2013-05-25 12:33 ` [Qemu-devel] [PATCH V13 0/6] enhancement for qmp/hmp interfaces of block info Eric Blake
2013-06-05 11:07 ` Stefan Hajnoczi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130605110728.GC30326@stefanha-thinkpad.muc.redhat.com \
    --to=stefanha@gmail.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xiawenc@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).