scsi_debug: rework resp_report_luns
authorDouglas Gilbert <dgilbert@interlog.com>
Sun, 1 May 2016 02:44:43 +0000 (22:44 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 4 May 2016 02:40:18 +0000 (22:40 -0400)
commit8d039e22b516c4c0ecaeb91f7566b5860fda14e7
tree25a058b0245a164fdbdf0b5d3d0130fe6fbd88c3
parentb01f6f8316af5226b0cada03e3b121e72dd4c17f
scsi_debug: rework resp_report_luns

Based on "[PATH V2] scsi_debug: rework resp_report_luns" patch
sent by Tomas Winkler on Thursday, 26 Feb 2015. His notes:
  1. Remove duplicated boundary checks which simplify the fill-in
     loop
  2. Use more of scsi generic API
Replace fixed length response array a with heap allocation
allowing up to 256 normal LUNs per target.

Signed-off-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Hannes Reinicke <hare@suse.de>
Reviewed-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c