summaryrefslogtreecommitdiffstats
path: root/qapi-schema.json
diff options
context:
space:
mode:
authorStefan Hajnoczi2012-01-18 15:40:46 +0100
committerKevin Wolf2012-01-26 14:49:14 +0100
commit12bd451fe0be83474910bb63b5874458141d4230 (patch)
tree2aec25bd837004ae1fac7a4951f824a7e0b2f9d7 /qapi-schema.json
parentblock: rate-limit streaming operations (diff)
downloadqemu-12bd451fe0be83474910bb63b5874458141d4230.tar.gz
qemu-12bd451fe0be83474910bb63b5874458141d4230.tar.xz
qemu-12bd451fe0be83474910bb63b5874458141d4230.zip
qmp: add block_stream command
Add the block_stream command, which starts copy backing file contents into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which is emitted when image streaming completes. Later patches add control over the background copy speed, cancelation, and querying running streaming operations. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi-schema.json')
-rw-r--r--qapi-schema.json31
1 files changed, 31 insertions, 0 deletions
diff --git a/qapi-schema.json b/qapi-schema.json
index 735eb352b5..9a1d9a936b 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -1434,3 +1434,34 @@
{ 'command': 'block_set_io_throttle',
'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
+
+# @block_stream:
+#
+# Copy data from a backing file into a block device.
+#
+# The block streaming operation is performed in the background until the entire
+# backing file has been copied. This command returns immediately once streaming
+# has started. The status of ongoing block streaming operations can be checked
+# with query-block-jobs. The operation can be stopped before it has completed
+# using the block_job_cancel command.
+#
+# If a base file is specified then sectors are not copied from that base file and
+# its backing chain. When streaming completes the image file will have the base
+# file as its backing file. This can be used to stream a subset of the backing
+# file chain instead of flattening the entire image.
+#
+# On successful completion the image file is updated to drop the backing file
+# and the BLOCK_JOB_COMPLETED event is emitted.
+#
+# @device: the device name
+#
+# @base: #optional the common backing file name
+#
+# Returns: Nothing on success
+# If streaming is already active on this device, DeviceInUse
+# If @device does not exist, DeviceNotFound
+# If image streaming is not supported by this device, NotSupported
+#
+# Since: 1.1
+##
+{ 'command': 'block_stream', 'data': { 'device': 'str', '*base': 'str' } }