]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
tcm_vhost: Multi-target support
authorAsias He <asias@redhat.com>
Tue, 5 Feb 2013 04:31:57 +0000 (12:31 +0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 13 Feb 2013 19:29:53 +0000 (11:29 -0800)
commit67e18cf9ab21648a477e91e0d3cb6dbdb1330262
tree2f39e32dfe7c2794082d61aea95dcdee38e5e4ae
parentadfa9570a56c3dbfc2a28baab77ff6f0b8f480d3
tcm_vhost: Multi-target support

In order to take advantages of Paolo's multi-queue virito-scsi, we need
multi-target support in tcm_vhost first. Otherwise all the requests go
to one queue and other queues are idle.

This patch makes:

1. All the targets under the wwpn is seen and can be used by guest.
2. No need to pass the tpgt number in struct vhost_scsi_target to
   tcm_vhost.ko. Only wwpn is needed.
3. We can always pass max_target = 255 to guest now, since we abort the
   request who's target id does not exist.

Changes in v2:
- Handle non-contiguous tpgt

Changes in v3:
- Simplfy lock in vhost_scsi_set_endpoint
- Return -EEXIST when does not match

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/vhost/tcm_vhost.c
drivers/vhost/tcm_vhost.h