From: Nicholas Bellinger Date: Sun, 23 Feb 2014 02:34:43 +0000 (-0800) Subject: vhost/scsi: Add T10 PI IOV -> SGL memory mapping logic X-Git-Tag: omap-for-v3.16/fixes-against-rc1~26^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e31885dd901e80d5bd528c1cbedde07ebbf051b2;p=pandora-kernel.git vhost/scsi: Add T10 PI IOV -> SGL memory mapping logic This patch adds vhost_scsi_map_iov_to_prot() to perform the mapping of T10 data integrity memory between virtio iov + struct scatterlist using get_user_pages_fast() following existing code. As with vhost_scsi_map_iov_to_sgl(), this does sanity checks against the total prot_sgl_count vs. pre-allocated SGLs, and loops across protection iovs using vhost_scsi_map_to_sgl() to perform the actual memory mapping. Also update tcm_vhost_release_cmd() to release associated tvc_prot_sgl[] struct page. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: H. Peter Anvin Acked-by: Michael S. Tsirkin Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed