[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2.1 1/2] blockjob: Fix recent BLOCK_JOB_READY re
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 2.1 1/2] blockjob: Fix recent BLOCK_JOB_READY regression |
Date: |
Fri, 27 Jun 2014 18:55:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Kevin Wolf <address@hidden> writes:
> Am 27.06.2014 um 15:47 hat Markus Armbruster geschrieben:
>> Commit bcada37 dropped the (undocumented) members type, len, offset,
>> speed, breaking tests/qemu-iotests/040 and 041.
>>
>> Restore them. This fixes 040, and partially fixes 041.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> blockjob.c | 6 +++++-
>> qapi/block-core.json | 6 +++++-
>> 2 files changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/blockjob.c b/blockjob.c
>> index 4da86cd..37a8f1f 100644
>> --- a/blockjob.c
>> +++ b/blockjob.c
>> @@ -256,7 +256,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 af6b436..8f42f24 100644
>> --- a/qapi/block-core.json
>> +++ b/qapi/block-core.json
>> @@ -1559,4 +1559,8 @@
>> # Since: 1.3
>> ##
>> { 'event': 'BLOCK_JOB_READY',
>> - 'data': { 'device': 'str' } }
>> + 'data': { 'type' : 'BlockJobType',
>> + 'device': 'str',
>> + 'len' : 'int',
>> + 'offset': 'int',
>> + 'speed' : 'int' } }
>
> Please document the added fields in the comment above the definition.
I hesistated, because it's not obvious to me whether we want all these
members from a design point of view, and then I forgot in my haste to
get the fix out.
Unwanted fields (if any) should be marked deprecated.
Anyway, I'll post a quick fix adding docs, for immediate commit. We can
then discuss further doc changes. Plenty of time for those.
> Looks good otherwise.
Thanks!