vhost/scsi: Enable T10 PI IOV -> SGL memory mapping
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 23 Feb 2014 02:22:31 +0000 (18:22 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 2 Jun 2014 19:42:14 +0000 (12:42 -0700)
commit95e7c4341b8e28dae5204378087c1e2a115abc82
tree72d011daf953191f311342d80cd51159f2678315
parente31885dd901e80d5bd528c1cbedde07ebbf051b2
vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

This patch updates vhost_scsi_handle_vq() to check for the existance
of virtio_scsi_cmd_req_pi comparing vq->iov[0].iov_len in order to
calculate seperate data + protection SGLs from data_num.

Also update tcm_vhost_submission_work() to pass the pre-allocated
cmd->tvc_prot_sgl[] memory into target_submit_cmd_map_sgls(), and
update vhost_scsi_get_tag() parameters to accept scsi_tag, lun, and
task_attr.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Sagi Grimberg <sagig@dev.mellanox.co.il>
Cc: H. Peter Anvin <hpa@zytor.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/vhost/scsi.c