[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 1/1] hw/scsi: Report errors and sense to gues
Re: [Qemu-devel] [PATCH v1 1/1] hw/scsi: Report errors and sense to guests through scsi-block
Mon, 1 Jul 2019 13:56:32 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2
On 01/07/19 12:14, Shinichiro Kawasaki wrote:
> I observe four of them listed below in sense data,
> when I ran basic operations to the zoned storage from the guest via
> 21h 04h: UNALIGNED WRITE COMMAND
> 21h 05h: WRITE BOUNDARY VIOLATION
> 21h 06h: ATTEMPT TO READ INVALID DATA
> 55h 0Eh: INSUFFICIENT ZONE RESOURCES
> These ASCs can be reported for write or read commands due to unexpected zone
> status or write pointer status. Reporting these ASCs to the guest, the user
> applications can handle them to manage zone/write pointer status, or help the
> user application developers to understand the failure reason and fix bugs.
> I took a look in scsi_sense_to_errno() and learned that ASCs are grouped in
> errnos. To report the ASCs above to the guest, is it good to add them in
> group defined in scsi_sense_to_errno()? The ASCs are reported with sense key
> ILLEGAL_REQUEST or DATA_PROTECT, then I think it fits in the function.
The grouping by errno is historical and pretty much broken. It should
be possible to change it to return just a bool.