Signed-off-by: Luiz Capitulino <lcapitul...@redhat.com>
---
 hw/scsi-disk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 9f451bc..85b1ce0 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -193,6 +193,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(RSTATE_IO_ERROR);
+        bdrv_iostatus_update(s->bs, error);
     } else {
         switch (error) {
         case ENOMEM:
@@ -1168,6 +1169,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);
     bdrv_set_removable(s->bs, scsi_type == TYPE_ROM);
     add_boot_device_path(s->qdev.conf.bootindex, &dev->qdev, ",0");
     return 0;
-- 
1.7.7.rc0.72.g4b5ea


Reply via email to