[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 37/47] blockjob: Fix recent BLOCK_JOB_READY regressio
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 37/47] blockjob: Fix recent BLOCK_JOB_READY regression |
Date: |
Fri, 27 Jun 2014 21:08:56 +0200 |
From: Markus Armbruster <address@hidden>
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 <address@hidden>
Tested-By: Benoit Canet <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
blockjob.c | 6 +++++-
qapi/block-core.json | 15 ++++++++++++++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/blockjob.c b/blockjob.c
index a6db01e..a32c1c8 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -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,
diff --git a/qapi/block-core.json b/qapi/block-core.json
index a46cdbe..6f41f84 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1558,12 +1558,25 @@
#
# 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' } }
--
1.8.3.1
- [Qemu-devel] [PULL 33/47] virtio-blk: Export request handling functions to dataplane, (continued)
- [Qemu-devel] [PULL 33/47] virtio-blk: Export request handling functions to dataplane, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 40/47] qemu-iotests: Add TestRepairQuorum to 041 to test drive-mirror node-name mode., Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 41/47] block.c: Don't return success for bdrv_append_temp_snapshot() failure, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 42/47] iotests: Allow out-of-tree run, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 43/47] configure: Enable out-of-tree iotests, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 45/47] iotests: Use $PYTHON for Python scripts, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 44/47] iotests: Source common.env, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 47/47] iotests: Fix 083 for out-of-tree builds, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 46/47] iotests: Drop Python version from 065's Shebang, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 21/47] virtio-blk: Move VirtIOBlockReq to header, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 37/47] blockjob: Fix recent BLOCK_JOB_READY regression,
Kevin Wolf <=
- [Qemu-devel] [PULL 38/47] blockjob: Fix recent BLOCK_JOB_ERROR regression, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 36/47] virtio-blk: Rename complete_request_early to complete_request_vring, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 35/47] virtio-blk: Unify {non-, }dataplane's request handlings, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 28/47] virtio-blk: Fill in VirtIOBlockReq.out in dataplane code, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 27/47] virtio-blk: Convert VirtIOBlockReq.out to structrue, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 29/47] virtio-blk: Fix and clean up the in_sg and out_sg check, Kevin Wolf, 2014/06/27
- [Qemu-devel] [PULL 39/47] block: Add replaces argument to drive-mirror, Kevin Wolf, 2014/06/27
- Re: [Qemu-devel] [PULL 00/47] Block patches for 2.1.0-rc0, Peter Maydell, 2014/06/29