Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH] scsi: do not retry FAILFAST commands on DID_TRANSPORT_DISRUPTED
@ 2021-01-26 13:02 Hannes Reinecke
  2021-01-26 13:21 ` Martin Wilck
  2021-01-28  0:51 ` michael.christie
  0 siblings, 2 replies; 7+ messages in thread
From: Hannes Reinecke @ 2021-01-26 13:02 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke,
	Martin Wilck, Hannes Reinecke

When a command is return with DID_TRANSPORT_DISRUPTED we should
be looking at the REQ_FAILFAST_TRANSPORT flag and do not retry
the command if set.
Otherwise multipath will be requeuing a command on the failed
path and not fail it over to one of the working paths.

Cc: Martin Wilck <martin.wilck@suse.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
 drivers/scsi/scsi_error.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index a52665eaf288..005118385b70 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1753,6 +1753,7 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
 	case DID_TIME_OUT:
 		goto check_type;
 	case DID_BUS_BUSY:
+	case DID_TRANSPORT_DISRUPTED:
 		return (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT);
 	case DID_PARITY:
 		return (scmd->request->cmd_flags & REQ_FAILFAST_DEV);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-28 18:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26 13:02 [PATCH] scsi: do not retry FAILFAST commands on DID_TRANSPORT_DISRUPTED Hannes Reinecke
2021-01-26 13:21 ` Martin Wilck
2021-01-28  0:51 ` michael.christie
2021-01-28  6:57   ` Hannes Reinecke
2021-01-28 13:40     ` Ewan D. Milne
2021-01-28 18:01     ` Mike Christie
2021-01-28 18:21       ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox