From: Wanlong Gao Date: Mon, 8 Apr 2013 13:31:16 +0000 (+0930) Subject: virtio-scsi: redo allocation of target data X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~63^2~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c370194df9a97248ca69e05bfbd2d21b4886fe5;p=pandora-kernel.git virtio-scsi: redo allocation of target data virtio_scsi_target_state is now empty. We will find new uses for it in the next few patches, so this patch does not drop it completely. And as James suggested, we use entries target_alloc and target_destroy in the host template to allocate and destroy the virtio_scsi_target_state of each target, attach this struct to scsi_target->hostdata. Now we can get at it from the sdev with scsi_target(sdev)->hostdata. No messing around with fixed size arrays and bulk memory allocation and no need to pass in the maximum target size as a parameter because everything should now happen dynamically. Cc: James Bottomley Cc: linux-scsi@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He Signed-off-by: Rusty Russell --- Reading git-diff-tree failed