aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-blk.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2010-02-25 12:06:58 -0300
committerAnthony Liguori <aliguori@us.ibm.com>2010-03-08 11:30:01 -0600
commit554a310bfe319a56de9d768efdb252115129d2a5 (patch)
treeb96781b970241a3a47dfed717fec7c303d61ed47 /hw/virtio-blk.c
parent93d67ee69d6104976961fbc98654872de28a5c96 (diff)
block: Emit BLOCK_IO_ERROR before vm_stop() call
The next commit will move the STOP event into do_vm_stop(), to have the expected event sequence we need to emit the I/O error event before calling vm_stop(). The expected sequence is: { "event": "BLOCK_IO_ERROR" [...] } { "event": "STOP" } Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/virtio-blk.c')
-rw-r--r--hw/virtio-blk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index b80402d0fd..8939bb2529 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -72,8 +72,8 @@ static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,
|| action == BLOCK_ERR_STOP_ANY) {
req->next = s->rq;
s->rq = req;
- vm_stop(0);
bdrv_mon_event(req->dev->bs, BDRV_ACTION_STOP, is_read);
+ vm_stop(0);
} else {
virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);
bdrv_mon_event(req->dev->bs, BDRV_ACTION_REPORT, is_read);