diff options
author | Wenchao Xia <wenchaoqemu@gmail.com> | 2014-06-18 08:43:45 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-23 11:12:27 -0400 |
commit | 5a2d2cbd8850db7c03d1333d6c29aab6e3bc75ad (patch) | |
tree | 48133597437af77e32a5e9a4d27eb5fb96565bc3 /blockjob.c | |
parent | a5ee7bd454ab484022e05537cfcb256e3d6dc90e (diff) | |
download | qemu-5a2d2cbd8850db7c03d1333d6c29aab6e3bc75ad.zip qemu-5a2d2cbd8850db7c03d1333d6c29aab6e3bc75ad.tar.gz qemu-5a2d2cbd8850db7c03d1333d6c29aab6e3bc75ad.tar.bz2 |
qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -34,6 +34,7 @@ #include "block/coroutine.h" #include "qmp-commands.h" #include "qemu/timer.h" +#include "qapi-event.h" void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs, int64_t speed, BlockDriverCompletionFunc *cb, @@ -277,7 +278,10 @@ BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs, default: abort(); } - bdrv_emit_qmp_error_event(job->bs, QEVENT_BLOCK_JOB_ERROR, action, is_read); + qapi_event_send_block_job_error(bdrv_get_device_name(bs), + is_read ? IO_OPERATION_TYPE_READ : + IO_OPERATION_TYPE_WRITE, + action, &error_abort); if (action == BLOCK_ERROR_ACTION_STOP) { block_job_pause(job); block_job_iostatus_set_err(job, error); |