mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-21 09:02:00 -06:00
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>
This commit is contained in:
parent
50fb19008f
commit
9fb118e6b3
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
|
||||||
vm_stop(RUN_STATE_IO_ERROR);
|
vm_stop(RUN_STATE_IO_ERROR);
|
||||||
|
bdrv_iostatus_set_err(s->bs, error);
|
||||||
} else {
|
} else {
|
||||||
switch (error) {
|
switch (error) {
|
||||||
case ENOMEM:
|
case ENOMEM:
|
||||||
|
@ -1260,6 +1261,7 @@ static int scsi_initfn(SCSIDevice *dev, uint8_t scsi_type)
|
||||||
|
|
||||||
s->qdev.type = scsi_type;
|
s->qdev.type = scsi_type;
|
||||||
qemu_add_vm_change_state_handler(scsi_dma_restart_cb, s);
|
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");
|
add_boot_device_path(s->qdev.conf.bootindex, &dev->qdev, ",0");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue