[SCSI] scsi_debug: prepare to enable clustering
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 26 Feb 2014 13:57:02 +0000 (22:57 +0900)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 19 Mar 2014 19:21:02 +0000 (12:21 -0700)
commitbe4e11be99dbb36308760595ee848ef51713b4b0
tree4a04def0b86cd14505e683b5c9c8423b24e0c592
parentc5af0db96b7c219245f4985314e11c7e716e82ae
[SCSI] scsi_debug: prepare to enable clustering

Currently, clustering support for scsi_debug is disabled.  This is
because there are for_each_sg() loops which assume that each sg list
element is consisted with a single page.  But enabling clustering
support, each sg list element for scsi commands can be consisted with
multiple pages.

This replaces these for_each_sg() loops with sg mapping iterator which
is capable of handling each sg list element is consisted with multiple
pages.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_debug.c