mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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>
This commit is contained in:
parent
93d67ee69d
commit
554a310bfe
3 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue