qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v5 00/15] block: generic image streaming
@ 2012-01-13 13:14 Stefan Hajnoczi
  2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 01/15] coroutine: add co_sleep_ns() coroutine sleep function Stefan Hajnoczi
                   ` (15 more replies)
  0 siblings, 16 replies; 32+ messages in thread
From: Stefan Hajnoczi @ 2012-01-13 13:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Marcelo Tosatti, Stefan Hajnoczi, Luiz Capitulino

Note: This is a resend of v5 because the emails I sent earlier today
disappeared.

This series adds the 'block_stream' command which copies the contents of a
backing file into the image file while the VM is running.  The series builds on
the zero detection features which I sent out before Christmas. I suggest
grabbing my git tree to try it out without merging this dependency:

https://github.com/stefanha/qemu/tree/image-streaming-api

The image streaming HMP/QMP commands are documented in the patch and also
described here:

http://wiki.qemu.org/Features/LiveBlockMigration/ImageStreamingAPI

The basic idea is to execute 'block_stream virtio0' while the guest is running.
Progress can be monitored using 'info block-jobs'.  When the streaming
operation completes it raises a QMP event.

Note: The last patch includes includes a Python test script called
test-stream.py, I do not propose to merge it.  When run in a QEMU source tree
it performs basic image streaming QMP tests.

v5:
 * Handle block_job_create() failure [Luiz]
 * Mark BLOCK_JOB_COMPLETED error field optional [Luiz]
 * Mark block_stream base parameter optional [Luiz]
 * Check bdrv_getlength() failure and don't call twice [Kevin]
 * Rename "id" to "backing_file" in bdrv_find_backing_image() [Kevin]
 * Rename BaseIdNotFound qerror to BaseNotFound [Kevin]
 * Document BaseNotFound qerror from block_stream
 * Document that qemu_co_sleep_ns() needs main loop [Kevin]
 * Make bdrv_co_is_allocated_base() private to block/stream.c [Kevin]
 * Clean up commit messages

v4:
 * Drop SQMP/EQMP docs from qmp-commands.hx [Luiz]
 * Follow QAPI doc conventions [Luiz]
 * Document QMP events in QMP/qmp-events.txt [Luiz]
 * Protect against hotplug, resize, eject, etc [Kevin]
 * Move block job functions from header to block.c [Kevin]
 * Return error from bdrg_change_backing_file() [Kevin]
 * Merge Marcelo's block_stream base partial streaming series [Marcelo]

Marcelo Tosatti (4):
  block: add bdrv_find_backing_image
  add QERR_BASE_NOT_FOUND
  block: add support for partial streaming
  docs: describe live block operations

Stefan Hajnoczi (11):
  coroutine: add co_sleep_ns() coroutine sleep function
  block: check bdrv_in_use() before blockdev operations
  block: add BlockJob interface for long-running operations
  block: add image streaming block job
  block: rate-limit streaming operations
  qmp: add block_stream command
  qmp: add block_job_set_speed command
  qmp: add block_job_cancel command
  qmp: add query-block-jobs
  blockdev: make image streaming safe across hotplug
  test: add image streaming test cases

 Makefile.objs           |    2 +
 QMP/qmp-events.txt      |   53 ++++++++++
 block.c                 |   70 +++++++++++++
 block.h                 |    2 +
 block/stream.c          |  260 +++++++++++++++++++++++++++++++++++++++++++++++
 block_int.h             |   44 ++++++++
 blockdev.c              |  199 +++++++++++++++++++++++++++++++++++-
 docs/live-block-ops.txt |   58 +++++++++++
 hmp-commands.hx         |   41 ++++++++
 hmp.c                   |   68 ++++++++++++
 hmp.h                   |    4 +
 monitor.c               |   13 +++
 monitor.h               |    2 +
 qapi-schema.json        |  116 +++++++++++++++++++++
 qemu-coroutine-sleep.c  |   38 +++++++
 qemu-coroutine.h        |    9 ++
 qerror.c                |    8 ++
 qerror.h                |    6 +
 qmp-commands.hx         |   24 +++++
 test-stream.py          |  208 +++++++++++++++++++++++++++++++++++++
 trace-events            |    9 ++
 21 files changed, 1233 insertions(+), 1 deletions(-)
 create mode 100644 block/stream.c
 create mode 100644 docs/live-block-ops.txt
 create mode 100644 qemu-coroutine-sleep.c
 create mode 100644 test-stream.py

-- 
1.7.7.3

^ permalink raw reply	[flat|nested] 32+ messages in thread
[parent not found: <1326443357-22506-1-git-send-email-stefanha@linux.vnet.ibm.com>]

end of thread, other threads:[~2012-01-18  8:47 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-13 13:14 [Qemu-devel] [PATCH v5 00/15] block: generic image streaming Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 01/15] coroutine: add co_sleep_ns() coroutine sleep function Stefan Hajnoczi
2012-01-17 12:54   ` Kevin Wolf
2012-01-17 13:31     ` Stefan Hajnoczi
2012-01-17 13:38       ` Kevin Wolf
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 02/15] block: check bdrv_in_use() before blockdev operations Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 03/15] block: add BlockJob interface for long-running operations Stefan Hajnoczi
2012-01-17 13:00   ` Kevin Wolf
2012-01-17 13:33     ` Stefan Hajnoczi
2012-01-17 13:44       ` Kevin Wolf
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 04/15] block: add image streaming block job Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 05/15] block: rate-limit streaming operations Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 06/15] qmp: add block_stream command Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 07/15] qmp: add block_job_set_speed command Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 08/15] qmp: add block_job_cancel command Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 09/15] qmp: add query-block-jobs Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 10/15] blockdev: make image streaming safe across hotplug Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 11/15] block: add bdrv_find_backing_image Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 12/15] add QERR_BASE_NOT_FOUND Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 13/15] block: add support for partial streaming Stefan Hajnoczi
2012-01-17 13:27   ` Kevin Wolf
2012-01-17 13:50     ` Marcelo Tosatti
2012-01-17 14:05       ` Kevin Wolf
2012-01-17 15:47         ` Marcelo Tosatti
2012-01-17 15:55           ` Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 14/15] docs: describe live block operations Stefan Hajnoczi
2012-01-13 13:14 ` [Qemu-devel] [PATCH v5 15/15] test: add image streaming test cases Stefan Hajnoczi
2012-01-13 16:49   ` Stefan Hajnoczi
2012-01-17 19:07     ` Lucas Meneghel Rodrigues
2012-01-18  8:47       ` Stefan Hajnoczi
2012-01-16 11:20 ` [Qemu-devel] [PATCH v5 00/15] block: generic image streaming Luiz Capitulino
     [not found] <1326443357-22506-1-git-send-email-stefanha@linux.vnet.ibm.com>
2012-01-13  8:29 ` [Qemu-devel] [PATCH v5 09/15] qmp: add query-block-jobs Stefan Hajnoczi

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