|
| From: | Hannes Reinecke |
| Subject: | Re: [PATCH 5/7] scsi: Add mapping for generic SCSI_HOST status to sense codes |
| Date: | Mon, 16 Nov 2020 20:03:27 +0100 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
On 11/16/20 7:57 PM, Paolo Bonzini wrote:
And I did it exactly for the opposite purpose: rather than painstakingly figuring out which codes _might_ be returned (and be utterly surprised if we missed some) add an interpretation for every _possible_ code, avoiding nasty surprises.On 16/11/20 19:40, Hannes Reinecke wrote:+ case SCSI_HOST_TARGET_FAILURE: + *sense = SENSE_CODE(TARGET_FAILURE); + return CHECK_CONDITION; + case SCSI_HOST_RESERVATION_ERROR: + return RESERVATION_CONFLICT; + case SCSI_HOST_ALLOCATION_FAILURE: + *sense = SENSE_CODE(SPACE_ALLOC_FAILED); + return CHECK_CONDITION; + case SCSI_HOST_MEDIUM_ERROR: + *sense = SENSE_CODE(READ_ERROR); + return CHECK_CONDITION;Can these actually be visible to userspace? I'd rather avoid having them in QEMU if possible.Otherwise, the patches are completely sensible.
Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.de +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
| [Prev in Thread] | Current Thread | [Next in Thread] |