From 370521a1d6f5537ea7271c119f3fbb7b0fa57063 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 18 Jan 2012 14:40:48 +0000 Subject: qmp: add block_job_cancel command Add block_job_cancel, which stops an active block streaming operation. When the operation has been cancelled the new BLOCK_JOB_CANCELLED event is emitted. Signed-off-by: Stefan Hajnoczi Acked-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- QMP/qmp-events.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'QMP/qmp-events.txt') diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index 0cd2275c3b..06cb404837 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -293,3 +293,27 @@ Example: "len": 10737418240, "offset": 10737418240, "speed": 0 }, "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } + + +BLOCK_JOB_CANCELLED +------------------- + +Emitted when a block job has been cancelled. + +Data: + +- "type": Job type ("stream" for image streaming, json-string) +- "device": Device name (json-string) +- "len": Maximum progress value (json-int) +- "offset": Current progress value (json-int) + On success this is equal to len. + On failure this is less than len. +- "speed": Rate limit, bytes per second (json-int) + +Example: + +{ "event": "BLOCK_JOB_CANCELLED", + "data": { "type": "stream", "device": "virtio-disk0", + "len": 10737418240, "offset": 134217728, + "speed": 0 }, + "timestamp": { "seconds": 1267061043, "microseconds": 959568 } } -- cgit v1.2.1