From 554a310bfe319a56de9d768efdb252115129d2a5 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Thu, 25 Feb 2010 12:06:58 -0300 Subject: 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 Signed-off-by: Anthony Liguori --- hw/scsi-disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/scsi-disk.c') diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index bf7efc0..522f521 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -190,8 +190,8 @@ static int scsi_handle_write_error(SCSIDiskReq *r, int error) if ((error == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC) || action == BLOCK_ERR_STOP_ANY) { r->status |= SCSI_REQ_STATUS_RETRY; - vm_stop(0); bdrv_mon_event(s->bs, BDRV_ACTION_STOP, 0); + vm_stop(0); } else { scsi_command_complete(r, CHECK_CONDITION, HARDWARE_ERROR); -- cgit v1.1