From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaSnq-0006S1-IC for qemu-devel@nongnu.org; Tue, 13 Dec 2011 08:53:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RaSnl-00046v-CG for qemu-devel@nongnu.org; Tue, 13 Dec 2011 08:53:54 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:57741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RaSnl-00044L-2T for qemu-devel@nongnu.org; Tue, 13 Dec 2011 08:53:49 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Dec 2011 13:53:45 -0000 Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBDDrfZw2900092 for ; Tue, 13 Dec 2011 13:53:41 GMT Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBDDrfi3002976 for ; Tue, 13 Dec 2011 06:53:41 -0700 From: Stefan Hajnoczi Date: Tue, 13 Dec 2011 13:52:22 +0000 Message-Id: <1323784351-25531-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v3 0/9] block: generic image streaming List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Marcelo Tosatti , Stefan Hajnoczi , Luiz Capitulino 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 copy-on-read and zero detection features which I sent out recently and I suggest grabbing my git tree to try it out without merging these dependencies yourself: http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/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. Stefan Hajnoczi (9): coroutine: add co_sleep_ns() coroutine sleep function 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 test: add image streaming test cases Makefile.objs | 3 +- block/stream.c | 174 ++++++++++++++++++++++++++++++++++++++++ block_int.h | 86 ++++++++++++++++++++ blockdev.c | 143 +++++++++++++++++++++++++++++++++ hmp-commands.hx | 41 ++++++++++ hmp.c | 81 +++++++++++++++++++ hmp.h | 4 + monitor.c | 13 +++ monitor.h | 2 + qapi-schema.json | 144 +++++++++++++++++++++++++++++++++ qemu-coroutine-sleep.c | 38 +++++++++ qemu-coroutine.h | 6 ++ qerror.c | 4 + qerror.h | 3 + qmp-commands.hx | 93 +++++++++++++++++++++ test-stream.py | 208 ++++++++++++++++++++++++++++++++++++++++++++++++ trace-events | 9 ++ 17 files changed, 1051 insertions(+), 1 deletions(-) create mode 100644 block/stream.c create mode 100644 qemu-coroutine-sleep.c create mode 100644 test-stream.py -- 1.7.7.3