From e31885dd901e80d5bd528c1cbedde07ebbf051b2 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Sat, 22 Feb 2014 18:34:43 -0800 Subject: [PATCH] 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-format-patch failed