提交 518848a2 编写于 作者: M Markus Armbruster 提交者: Kevin Wolf

blockjob: Fix recent BLOCK_JOB_READY regression

Commit bcada37b 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: NMarkus Armbruster <armbru@redhat.com>
Tested-By: NBenoit Canet <benoit@irqsave.net>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 d64c60a7
......@@ -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,
......
......@@ -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' } }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册