On 11/16/20 7:57 PM, Paolo Bonzini wrote:
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.
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.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
h...@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