scsi: infinite guest hangs with scsi-disk
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | virtio-scsi: trace eventshw/ hw/ | +38 | 0 replies | |
| 2/3 | scsi: make io_timeout configurablehw/ hw/ include/ | +18 | 6 replies | |
| 3/3 | scsi: add tracing for SG_IO commandshw/ hw/ hw/ | +13 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] scsi: infinite guest hangs with scsi-disk
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(-)
Signature · 1 line
2.16.4