[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)
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

Simple merge