In several places like LU setup and pr_ops we will hit the noretry code path because we do not retry any passthrough commands that hit device errors even though scsi-ml thinks the command is retryable. This has us only fast fail commands that hit device errors that have been submitted through the block layer directly and not via scsi_execute. This allows SG IO and other users to continue to get fast failures and all device errors returned to them, and scsi_execute users will get their retries they had requested. Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx> --- drivers/scsi/scsi_error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index ac4471e33a9c..573d926220c4 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1806,7 +1806,8 @@ bool scsi_noretry_cmd(struct scsi_cmnd *scmd) * assume caller has checked sense and determined * the check condition was retryable. */ - if (req->cmd_flags & REQ_FAILFAST_DEV || blk_rq_is_passthrough(req)) + if (req->cmd_flags & REQ_FAILFAST_DEV || + scmd->submitter == SUBMITTED_BY_BLOCK_PT) return true; return false; -- 2.18.2