Spdk/lib/scsi
Daniel Verkamp 36a8f75006 scsi: fix LUN 0 check in scsi_dev_construct
When constructing a SCSI device, LUN 0 must be assigned to some LUN.
However, the current code was assuming that LUN 0 had to be in the first
array element of lun_id_list in spdk_scsi_dev_construct().  Combined
with the scripts/rpc.py implementation that uses a Python (unordered)
dictionary object to generate the lun_ids array, there could be cases
where LUN 0 exists in the list but isn't first.

Fix the check by allowing LUN 0 in any position of the lun_id_list
array.

Change-Id: I39f387ec238fcecca8d2d786d3d42c42a4790637
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/381611
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2017-10-06 16:37:27 -04:00
..
dev.c scsi: fix LUN 0 check in scsi_dev_construct 2017-10-06 16:37:27 -04:00
lun_db.c scsi: remove delete_lun RPC call and move claimed flag 2017-03-13 11:27:22 -07:00
lun.c Revert "scsi: remove LUN I/O channel ref counting" 2017-09-26 18:44:55 -04:00
Makefile bdev: add API to translate to SCSI status 2017-05-04 09:11:42 -07:00
port.c scsi: make spdk_scsi_port definition private 2017-05-04 09:05:53 -07:00
scsi_bdev.c log: remove uses of SPDK_TRACE_DEBUG 2017-08-29 15:07:13 -04:00
scsi_internal.h Revert "scsi: remove LUN I/O channel ref counting" 2017-09-26 18:44:55 -04:00
scsi_rpc.c jsonrpc: modify API to pass request to handler 2017-07-06 13:48:12 -04:00
scsi.c scsi: Remove global unmap config parameters 2017-08-11 19:54:32 -04:00
task.c bdev: rename blockdev instances to bdev 2017-07-14 13:31:30 -04:00