linux-stable/drivers/vhost
Sudhakar Panneerselvam 5ae6a6a915 scsi: vhost: Notify TCM about the maximum sg entries supported per command
vhost-scsi pre-allocates the maximum sg entries per command and if a
command requires more than VHOST_SCSI_PREALLOC_SGLS entries, then that
command is failed by it. This patch lets vhost communicate the max sg limit
when it registers vhost_scsi_ops with TCM. With this change, TCM would
report the max sg entries through "Block Limits" VPD page which will be
typically queried by the SCSI initiator during device discovery. By knowing
this limit, the initiator could ensure the maximum transfer length is less
than or equal to what is reported by vhost-scsi.

Link: https://lore.kernel.org/r/1590166317-953-1-git-send-email-sudhakar.panneerselvam@oracle.com
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-05-26 15:52:08 -04:00
..
Kconfig vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
iotlb.c vhost: factor out IOTLB 2020-04-01 12:06:26 -04:00
net.c vhost: factor out IOTLB 2020-04-01 12:06:26 -04:00
scsi.c scsi: vhost: Notify TCM about the maximum sg entries supported per command 2020-05-26 15:52:08 -04:00
test.c compat_ioctl: remove most of fs/compat_ioctl.c 2019-12-01 13:46:15 -08:00
test.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdpa.c vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
vhost.c vhost: factor out IOTLB 2020-04-01 12:06:26 -04:00
vhost.h vhost: factor out IOTLB 2020-04-01 12:06:26 -04:00
vringh.c vringh: IOTLB support 2020-04-01 12:06:26 -04:00
vsock.c vhost: allow per device message handler 2020-04-01 12:06:26 -04:00