All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] scsi: infinite guest hangs with scsi-disk
@ 2020-11-16 18:31 Hannes Reinecke
  2020-11-16 18:31 ` [PATCH 1/3] virtio-scsi: trace events Hannes Reinecke
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Hannes Reinecke @ 2020-11-16 18:31 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, Hannes Reinecke

Hi all,

one of our customers reported an infinite guest hang following an FC link loss  when using scsi-disk.
Problem is that scsi-disk issues SG_IO command with a timeout of UINT_MAX, which essentially signals
'no timeout' to the host kernel. So if the command gets lost eg during an unexpected link loss the
HBA driver will never attempt to abort or return the command. Hence the guest will hang forever, and
the only way to resolve things is to reboot the host.

To solve it this patchset adds an 'io_timeout' parameter to scsi-disk and scsi-generic, which allows
the admin to specify a command timeout for SG_IO request. It is initialized to 30 seconds to avoid the
infinite hang as mentioned above.

As usual, comments and reviews are welcome.

Hannes Reinecke (3):
  virtio-scsi: trace events
  scsi: make io_timeout configurable
  scsi: add tracing for SG_IO commands

 hw/scsi/scsi-disk.c    |  9 ++++++---
 hw/scsi/scsi-generic.c | 25 ++++++++++++++++++-------
 hw/scsi/trace-events   | 13 +++++++++++++
 hw/scsi/virtio-scsi.c  | 30 +++++++++++++++++++++++++++++-
 include/hw/scsi/scsi.h |  4 +++-
 5 files changed, 69 insertions(+), 12 deletions(-)

-- 
2.16.4



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

end of thread, other threads:[~2021-09-23  7:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 18:31 [PATCH 0/3] scsi: infinite guest hangs with scsi-disk Hannes Reinecke
2020-11-16 18:31 ` [PATCH 1/3] virtio-scsi: trace events Hannes Reinecke
2020-11-16 18:31 ` [PATCH 2/3] scsi: make io_timeout configurable Hannes Reinecke
2021-09-20 18:56   ` Paolo Bonzini
2021-09-21  5:39     ` Hannes Reinecke
2021-09-21  7:25       ` Paolo Bonzini
2021-09-22 15:47   ` Philippe Mathieu-Daudé
2021-09-23  6:03     ` Hannes Reinecke
2021-09-23  7:19     ` Paolo Bonzini
2020-11-16 18:31 ` [PATCH 3/3] scsi: add tracing for SG_IO commands Hannes Reinecke
2020-11-16 19:09 ` [PATCH 0/3] scsi: infinite guest hangs with scsi-disk no-reply
2020-12-17 13:49 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.