linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi command timeout fixes
@ 2014-06-13 12:01 Hannes Reinecke
  2014-06-13 12:01 ` [PATCH 1/2] scsi_error: set DID_TIME_OUT correctly Hannes Reinecke
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Hannes Reinecke @ 2014-06-13 12:01 UTC (permalink / raw)
  To: James Bottomley
  Cc: Christoph Hellwig, Bart vn Assche, Ewan Milne, linux-scsi,
	Hannes Reinecke

Hi all,

I've received reports claiming they're seeing a double command completion
occasionally when a command timeout happens.

Delving into it I found this this indeed might happening; reason being
that the LLDD will only be informed about a timed-out command by
calling scsi_try_to_abort_command(). Anytime before that the LLDD
is free to assume the command is valid and might call scsi_done() on it.
Which then will lead to interesting issues in the error handler.

And while debugging this I've found we're setting DID_TIME_OUT incorrectly,
which might lead to spurious command timeout detection.

Hannes Reinecke (2):
  scsi_error: set DID_TIME_OUT correctly
  scsi: Do not complete timed-out command

 drivers/scsi/scsi.c       |  2 ++
 drivers/scsi/scsi_error.c | 16 +++++++++-------
 drivers/scsi/scsi_priv.h  |  1 +
 3 files changed, 12 insertions(+), 7 deletions(-)

-- 
1.7.12.4


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

end of thread, other threads:[~2014-06-19 14:43 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 12:01 [PATCH 0/2] scsi command timeout fixes Hannes Reinecke
2014-06-13 12:01 ` [PATCH 1/2] scsi_error: set DID_TIME_OUT correctly Hannes Reinecke
2014-06-13 14:32   ` Ewan Milne
2014-06-13 16:25     ` Christoph Hellwig
2014-06-13 12:01 ` [PATCH 2/2] scsi: Do not complete timed-out command Hannes Reinecke
2014-06-13 16:29   ` Christoph Hellwig
2014-06-16 18:23   ` Ewan Milne
2014-06-17  5:53     ` Hannes Reinecke
2014-06-19 14:43       ` Ewan Milne
2014-06-13 16:52 ` [PATCH 0/2] scsi command timeout fixes James Bottomley
2014-06-13 17:16   ` hch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).