On 10/02/2015 01:58 AM, Bart Van Assche wrote: > On 09/29/2015 03:47 AM, Hannes Reinecke wrote: >> + blk_execute_rq(rq->q, NULL, rq, 1); >> + if (rq->errors) >> + err = rq->errors; > > Not all code in the block layer uses the SCSI error codes. Do we need > code to convert negative error codes into a SCSI error code here ? An > example: > > void blk_mq_abort_requeue_list(struct request_queue *q) > { > [ ... ] > rq->errors = -EIO; > [ ... ] > } > EXPORT_SYMBOL(blk_mq_abort_requeue_list); > Sigh. In principle, yes. In practise, however, there are plenty of other instances where the SCSI core assumes rq->errors to be holding a valid SCSI error code. And as the device handler is plain SCSI I guess we're fine here. Separating SCSI error codes from block-layer error codes would be a nice topic for LSF ... Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@xxxxxxx +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html