qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH V4 00/13] add qmp/hmp interfaces for snapshot info
@ 2013-01-17  7:39 Wenchao Xia
  2013-01-17  7:39 ` [Qemu-devel] [PATCH V4 01/13] qemu-img: remove unused parameter in collect_image_info() Wenchao Xia
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Wenchao Xia @ 2013-01-17  7:39 UTC (permalink / raw)
  To: qemu-devel
  Cc: aliguori, phrdina, stefanha, armbru, lcapitulino, pbonzini,
	Wenchao Xia

  This serial of patches does two things: merge some info code
in qemu-img, and add following interfaces:
1) qmp: query-images
2) qmp: query-snapshots
3) hmp: show snapshot info on a single block device
  These patches follows the rule that use qmp to retieve information,
hmp layer just do a translation from qmp object it got, so almost
every hmp interface may have a correlated qmp interface.
  To make code graceful, snapshot retrieving code in qemu and qemu-img
are merged into block.c, and some function name was adjusted to make it
tips better. Now it works as:

   qemu          qemu-img

dump_monitor    dump_stdout
     |--------------| 
            |
           qmp
            |
          block

Note:
  Last two patches need previous sent patches which extend hmp sub command, at:
http://lists.nongnu.org/archive/html/qemu-devel/2012-12/msg03487.html

v2:
  Rename and adjusted qmp interface according to comments from Eric.
  Spelling fix.
  Information retrieving function in block layer goes to seperated patch.
  Free qmp object after usage in hmp.
  Added counterpart in qmp-commands.hx.
  Better tips in qmp-schema.json.

v3:
  Spelling fix in commit message, patch 03/11.
  Spelling fix in code, patch 06/11.
  Add comments that vm-state-size is in bytes, and change size of it in
example to a reasonable number, patch 08/11.

v4:
  02/13: in bdrv_get_filename(), add const to parameter *bs.
  03/13: new added, in which the function correct the behavior in info
retrieving.
  04/13: in bdrv_query_snapshot_infolist(), remove NULL check before call
err_setg(), added TODO comments that let block layer function set error instead
of this layer to tip better for errors, Split out patch about image info to
patch 05/13.
  05/13: new splitted, and it checks *bs by calling bdrv_can_read_snapshot()
before collect internal snasphot info to avoid *err is set unexpectly now.
  06/13: check if error happens after calling bdrv_query_image_info().
  08/13: rename info to image in DeviceImageInfo and make it optional,
when device is not inserted it will be empty, added error handling code
when met error in calling block layer API.
  09/13: distinguish *id and *name in bdrv_find_snapshots(), caller
can choose what to search with. id_wellformed() should be called in
new snapshot creation interface above this function in the future.
  10/13: now this interface have addtional parameter *device, which
enable showing internal snapshots on a single device. Also use
bdrv_can_read_snapshot() instead of bdrv_can_snapshot() now.
  11/13: this function goes to hmp.c so hmp_handler_error is not exported
any more, split out patch that switch snapshot info function to patch 12/13.
  12/13: new splitted.
  13/13: use qmp API instead of directly calling block layer API, now
all hmp function have correspond qmp funtion in this serial.

Wenchao Xia (13):
  1 qemu-img: remove unused parameter in collect_image_info()
  2 block: add bdrv_get_filename() function
  3 block: add bdrv_can_read_snapshot() function
  4 block: add snapshot info query function bdrv_query_snapshot_infolist()
  5 block: add image info query function bdrv_query_image_info()
  6 qemu-img: switch image retrieving function
  7 block: rename bdrv_query_info to bdrv_query_block_info
  8 qmp: add interface query-images.
  9 block: export function bdrv_find_snapshot()
  10 qmp: add interface query-snapshots
  11 hmp: add function hmp_info_snapshots()
  12 hmp: switch snapshot info function to qmp based one
  13 hmp: show snapshots on single block device

 block.c               |  274 ++++++++++++++++++++++++++++++++++++++++++++++++-
 hmp.c                 |   47 +++++++++
 hmp.h                 |    1 +
 include/block/block.h |   14 +++-
 monitor.c             |    8 +-
 qapi-schema.json      |   46 ++++++++
 qemu-img.c            |   91 +---------------
 qmp-commands.hx       |  129 +++++++++++++++++++++++
 savevm.c              |   94 +----------------
 9 files changed, 522 insertions(+), 182 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-01-21  6:41 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17  7:39 [Qemu-devel] [PATCH V4 00/13] add qmp/hmp interfaces for snapshot info Wenchao Xia
2013-01-17  7:39 ` [Qemu-devel] [PATCH V4 01/13] qemu-img: remove unused parameter in collect_image_info() Wenchao Xia
2013-01-17  7:39 ` [Qemu-devel] [PATCH V4 02/13] block: add bdrv_get_filename() function Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 03/13] block: add bdrv_can_read_snapshot() function Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 04/13] block: add snapshot info query function bdrv_query_snapshot_infolist() Wenchao Xia
2013-01-17 21:53   ` Eric Blake
2013-01-18  1:57     ` Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 05/13] block: add image info query function bdrv_query_image_info() Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 06/13] qemu-img: switch image retrieving function Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 07/13] block: rename bdrv_query_info to bdrv_query_block_info Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 08/13] qmp: add interface query-images Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 09/13] block: export function bdrv_find_snapshot() Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 10/13] qmp: add interface query-snapshots Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 11/13] hmp: add function hmp_info_snapshots() Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 12/13] hmp: switch snapshot info function to qmp based one Wenchao Xia
2013-01-17  7:40 ` [Qemu-devel] [PATCH V4 13/13] hmp: show snapshots on single block device Wenchao Xia
2013-01-21  6:21 ` [Qemu-devel] [PATCH V4 00/13] add qmp/hmp interfaces for snapshot info Wenchao Xia

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