From: Nicholas Bellinger Date: Fri, 21 Jun 2013 21:32:04 +0000 (-0700) Subject: vhost/scsi: Add pre-allocation for tv_cmd SGL + upages memory X-Git-Tag: v3.12-rc1~23^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3aee26b4ae91048c933dc622f00b7bb01f7f0ff1;p=pandora-kernel.git vhost/scsi: Add pre-allocation for tv_cmd SGL + upages memory This patch adds support for pre-allocation of per tv_cmd descriptor scatterlist + user-space page pointer memory using se_sess->sess_cmd_map within tcm_vhost_make_nexus() code. This includes sanity checks within vhost_scsi_map_to_sgl() to reject I/O that exceeds these initial hardcoded values, and the necessary cleanup in tcm_vhost_make_nexus() failure path + tcm_vhost_drop_nexus(). v3 changes: - Rebase to v3.11-rc5 code Cc: Michael S. Tsirkin Cc: Asias He Cc: Kent Overstreet Reviewed-by: Asias He Acked-by: Michael S. Tsirkin Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed