]> www.infradead.org Git - users/jedix/linux-maple.git/commit
vhost/scsi: Respond to control queue operations
authorBijan Mottahedeh <bijan.mottahedeh@oracle.com>
Mon, 30 Jul 2018 22:14:41 +0000 (15:14 -0700)
committerBrian Maly <brian.maly@oracle.com>
Mon, 5 Nov 2018 21:12:13 +0000 (16:12 -0500)
commit9dd6b6b20b52e6af0a8a0bb778dd4538170d969b
tree6f93d3b45c1a250c5f8dc303d96b5ab4320fe9f3
parent31d475899607993be2e615fd31ec5f2a703c95c8
vhost/scsi: Respond to control queue operations

The vhost-scsi driver currently does not handle any control queue
operations. In particular, vhost_scsi_ctl_handle_kick, merely prints out
a debug message but does nothing else. This can cause guest VMs to hang.

As part of SCSI recovery from an error, e.g., an I/O timeout, the SCSI
midlayer attempts to abort the failed operation. The SCSI virtio driver
translates the abort to a SCSI TMF request that gets put on the control
queue (virtscsi_abort -> virtscsi_tmf). The SCSI virtio driver then
waits indefinitely for this request to be completed, but it never will
because vhost-scsi never responds to that request.

To avoid a hang, always respond to control queue operations; explicitly
reject TMF requests, and return a no-op response to event requests.

NOTE: copy_from_iter_full() is not available so use copy_from_iter().

Orabug: 28775573

Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/vhost/scsi.c