diff mbox

[PULL,38/47] blockjob: Fix recent BLOCK_JOB_ERROR regression

Message ID 1403896146-3063-39-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

Kevin Wolf June 27, 2014, 7:08 p.m. UTC
From: Markus Armbruster <armbru@redhat.com>

Commit 5a2d2cb screwed up the the value of members device and action,
breaking tests/qemu-iotests/041.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Tested-By: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 blockjob.c           | 2 +-
 qapi/block-core.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/blockjob.c b/blockjob.c
index a32c1c8..67a64ea 100644
--- a/blockjob.c
+++ b/blockjob.c
@@ -300,7 +300,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 6f41f84..ff7224f 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1551,7 +1551,7 @@ 
 { 'event': 'BLOCK_JOB_ERROR',
   'data': { 'device'   : 'str',
             'operation': 'IoOperationType',
-            'action'   : 'BlockdevOnError' } }
+            'action'   : 'BlockErrorAction' } }
 
 ##
 # @BLOCK_JOB_READY