]> git.proxmox.com Git - mirror_qemu.git/commitdiff
blockjob: Fix recent BLOCK_JOB_READY regression
authorMarkus Armbruster <armbru@redhat.com>
Fri, 27 Jun 2014 17:24:13 +0000 (19:24 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 27 Jun 2014 18:00:00 +0000 (20:00 +0200)
Commit bcada37 dropped the (up to now undocumented) members type, len,
offset, speed, breaking tests/qemu-iotests/040 and 041.

Restore and document them.  This fixes 040, and partially fixes 041.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Tested-By: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockjob.c
qapi/block-core.json

index a6db01e95329b84aa58520de2c36cf44c99f7f3c..a32c1c8dd739558331a763c7cf9729776ea6b94a 100644 (file)
@@ -270,7 +270,11 @@ void block_job_event_completed(BlockJob *job, const char *msg)
 
 void block_job_event_ready(BlockJob *job)
 {
-    qapi_event_send_block_job_ready(bdrv_get_device_name(job->bs), &error_abort);
+    qapi_event_send_block_job_ready(job->driver->job_type,
+                                    bdrv_get_device_name(job->bs),
+                                    job->len,
+                                    job->offset,
+                                    job->speed, &error_abort);
 }
 
 BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs,
index a46cdbe6aa7979626e9c9ed4cd2cadd0ccabd191..6f41f84c44142fe66adb35b2a9831237b81f2ead 100644 (file)
 #
 # Emitted when a block job is ready to complete
 #
+# @type: job type
+#
 # @device: device name
 #
+# @len: maximum progress value
+#
+# @offset: current progress value. On success this is equal to len.
+#          On failure this is less than len
+#
+# @speed: rate limit, bytes per second
+#
 # Note: The "ready to complete" status is always reset by a @BLOCK_JOB_ERROR
 # event
 #
 # Since: 1.3
 ##
 { 'event': 'BLOCK_JOB_READY',
-  'data': { 'device': 'str' } }
+  'data': { 'type'  : 'BlockJobType',
+            'device': 'str',
+            'len'   : 'int',
+            'offset': 'int',
+            'speed' : 'int' } }