aboutsummaryrefslogtreecommitdiff
path: root/blockjob.c
diff options
context:
space:
mode:
authorWenchao Xia <wenchaoqemu@gmail.com>2014-06-18 08:43:45 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-06-23 11:12:27 -0400
commit5a2d2cbd8850db7c03d1333d6c29aab6e3bc75ad (patch)
tree48133597437af77e32a5e9a4d27eb5fb96565bc3 /blockjob.c
parenta5ee7bd454ab484022e05537cfcb256e3d6dc90e (diff)
downloadqemu-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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/blockjob.c b/blockjob.c
index bc63d42..ee2a6fb 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -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);