于 2014/6/28 1:24, Markus Armbruster 写道:
> Commit 5a2d2cb screwed up the the value of members device and action,
> breaking tests/qemu-iotests/041.
> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> Tested-By: Benoit Canet <ben...@irqsave.net>
> Reviewed-by: Kevin Wolf <kw...@redhat.com>
> Reviewed-by: Luiz Capitulino <lcapitul...@redhat.com>
> ---
>   blockjob.c           | 2 +-
>   qapi/block-core.json | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/blockjob.c b/blockjob.c
> index 37a8f1f..4d8ff45 100644
> --- a/blockjob.c
> +++ b/blockjob.c
> @@ -286,7 +286,7 @@ BlockErrorAction block_job_error_action(BlockJob *job, 
> BlockDriverState *bs,
>       default:
>           abort();
>       }
> -    qapi_event_send_block_job_error(bdrv_get_device_name(bs),
> +    qapi_event_send_block_job_error(bdrv_get_device_name(job->bs),
>                                       is_read ? IO_OPERATION_TYPE_READ :
>                                       IO_OPERATION_TYPE_WRITE,
>                                       action, &error_abort);
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 822fe16..fd5b579 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1544,7 +1544,7 @@
>   { 'event': 'BLOCK_JOB_ERROR',
>     'data': { 'device'   : 'str',
>               'operation': 'IoOperationType',
> -            'action'   : 'BlockdevOnError' } }
> +            'action'   : 'BlockErrorAction' } }
>   
  It is my mistake to use BlockdevOnError in code incorrectly.
The define as 'BlockdevOnError' before is on purpose, since the
doc for 'BlockErrorAction' says: stop means a VM is stoped, but
for block-job it is not true, so I chosed a different type, and
'BlockdevOnError' seems the right one(see the doc for it). We can
fix it in C caller or add doc in .json file later.
  I am occupied by other things these days, thanks for fixing
the bugs introduced by me!


>   ##
>   # @BLOCK_JOB_READY
> 


Reply via email to