On Mon, Jun 10, 2013 at 09:40:52AM +0200, Hannes Reinecke wrote: > When a command runs into a timeout we need to send an 'ABORT TASK' > TMF. This is typically done by the 'eh_abort_handler' LLDD callback. > > Conceptually, however, this function is a normal SCSI command, so > there is no need to enter the error handler. > > This patch implements a new scsi_abort_command() function which > invokes an asynchronous function scsi_eh_abort_handler() to > abort the commands via 'eh_abort_handler'. > > If the 'eh_abort_handler' returns SUCCESS or FAST_IO_FAIL the > command will be retried if possible. If no retries are allowed > the command will be returned immediately, as we have to assume > the TMF succeeded and the command is completed with the LLDD. > If the TMF fails the command will be pushed back onto the > list of failed commands and the SCSI EH handler will be > called immediately for all timed-out commands. Why can't we use a work item per command? Linking things into a list just to queue it up to workqueues missed half of the point of the workqueue infrastructure. -- 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