aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2011-09-26 17:43:53 -0300
committerKevin Wolf <kwolf@redhat.com>2011-10-11 09:42:45 +0200
commit9fb118e6b3d1744c6093588b3db613bc25d64e00 (patch)
tree24ce726159e96c2ac79eb8727f6a52fa4c8ff97e
parent50fb19008fb91e3825f18b69f4adcae2db9863eb (diff)
scsi: Support I/O status
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--hw/scsi-disk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 4f681ef092..69095780ac 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -228,6 +228,7 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type)
bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
vm_stop(RUN_STATE_IO_ERROR);
+ bdrv_iostatus_set_err(s->bs, error);
} else {
switch (error) {
case ENOMEM:
@@ -1260,6 +1261,7 @@ static int scsi_initfn(SCSIDevice *dev, uint8_t scsi_type)
s->qdev.type = scsi_type;
qemu_add_vm_change_state_handler(scsi_dma_restart_cb, s);
+ bdrv_iostatus_enable(s->bs);
add_boot_device_path(s->qdev.conf.bootindex, &dev->qdev, ",0");
return 0;
}