scsi: core: No retries on abort success
Add a new optional routine, eh_should_retry_cmd(), in scsi_host_template that allows the transport to decide if a cmd is retryable. Return true if the transport is in a state the cmd should be retried on. Update scmd_eh_abort_handler() and scsi_eh_flush_done_q() to both call scsi_eh_should_retry_cmd() to check whether the command needs to be retried. The above changes were based on a patch by Mike Christie. Link: https://lore.kernel.org/r/1609969748-17684-3-git-send-email-muneendra.kumar@broadcom.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Muneendra Kumar <muneendra.kumar@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
962c8dcdd5
commit
60bee27ba2
@@ -314,6 +314,12 @@ struct scsi_host_template {
|
||||
* Status: OPTIONAL
|
||||
*/
|
||||
enum blk_eh_timer_return (*eh_timed_out)(struct scsi_cmnd *);
|
||||
/*
|
||||
* Optional routine that allows the transport to decide if a cmd
|
||||
* is retryable. Return true if the transport is in a state the
|
||||
* cmd should be retried on.
|
||||
*/
|
||||
bool (*eh_should_retry_cmd)(struct scsi_cmnd *scmd);
|
||||
|
||||
/* This is an optional routine that allows transport to initiate
|
||||
* LLD adapter or firmware reset using sysfs attribute.
|
||||
|
||||
Reference in New Issue
Block a user