Re: [Qemu-devel] [PATCH v2] scsi-block: Handle error from host devices

2018-04-03 Thread Fam Zheng
On Wed, 04/04 09:47, Fam Zheng wrote: > The callback of blk_aio_ioctl is not sensible to SCSI errors, so > werror=stop doesn't work if ioctl returns 0 but the scsi status is > error. > > Peek at the sg_io_hdr_t fields and amend ret to fix that. > > Signed-off-by: Fam Zheng > > --- > > v2: Fix

[Qemu-devel] [PATCH v2] scsi-block: Handle error from host devices

2018-04-03 Thread Fam Zheng
The callback of blk_aio_ioctl is not sensible to SCSI errors, so werror=stop doesn't work if ioctl returns 0 but the scsi status is error. Peek at the sg_io_hdr_t fields and amend ret to fix that. Signed-off-by: Fam Zheng --- v2: Fix ->cb. [Daniel] --- hw/scsi/scsi-disk.c | 21 +++