On 04/20/2017 04:14 AM, Martin K. Petersen wrote: > Bart Van Assche <Bart.VanAssche@xxxxxxxxxxx> writes: > >> On Thu, 2017-04-06 at 15:36 +0200, Hannes Reinecke wrote: >>> The block layer always calls the timeout function from a workqueue >>> context, so there is no need to have yet another workqueue for >>> running command aborts. >>> >>> [ ... ] >>> @@ -271,10 +266,14 @@ enum blk_eh_timer_return scsi_times_out(struct request *req) >>> rtn = host->hostt->eh_timed_out(scmd); >>> >>> if (rtn == BLK_EH_NOT_HANDLED) { >>> - if (scsi_abort_command(scmd) != SUCCESS) { >>> + int ret; >>> + >>> + ret = scsi_abort_command(scmd); >>> + if (ret == FAILED) { >>> set_host_byte(scmd, DID_TIME_OUT); >>> scsi_eh_scmd_add(scmd); >>> - } >>> + } else if (ret == FAST_IO_FAIL) >>> + rtn = BLK_EH_RESET_TIMER; >>> } >> >> Has this patch been tested with the traditional block layer? For the >> traditional block layer scsi_times_out() is called with the queue lock >> held. Does this patch cause .eh_abort_handler(), a function that may >> sleep, to be called with the queue lock held? > > Hannes: Ping! > Looks like Bart's right. Will be updating the patch. Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking 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)