numam-spdk/lib/scsi
Tomasz Zawadzki 90b0873665 scsi: handle return status of spdk_scsi_lun_claim(lun)
This is necessary to prevent claiming the same LUN twice
and properly cleanup in case of an error during spdk_scsi_dev_construct.

This patch addresses three issues:
- spdk_scsi_lun_claim error is correctly handled in spdk_scsi_dev_add_lun
- on error when constructing scsi dev, it is now correctly removed along with attached luns
- spdk_scsi_dev_destruct not only unclaims, but calls spdk_scsi_lun_destruct on each lun in dev

Unit tests relevant to this behaviour are changed to show this functionality is now working.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I111c320f875e5003e3f1f7748a2630097301ce1b
2017-02-16 11:03:48 +01:00
..
dev.c scsi: handle return status of spdk_scsi_lun_claim(lun) 2017-02-16 11:03:48 +01:00
lun_db.c scsi: import SCSI/blockdev translation layer 2016-08-01 10:35:01 -07:00
lun.c scsi: handle return status of spdk_scsi_lun_claim(lun) 2017-02-16 11:03:48 +01:00
Makefile scsi: translate nvme error to scsi error (#54) 2016-10-28 13:06:45 -07:00
port.c scsi: import SCSI/blockdev translation layer 2016-08-01 10:35:01 -07:00
scsi_bdev.c scsi: fix the scsi read write direction issue. 2017-01-23 16:12:27 -07:00
scsi_internal.h unit_test: check for adding same lun twice to scsi device 2017-02-16 10:11:20 +01:00
scsi_nvme.c scsi: translate nvme error to scsi error (#54) 2016-10-28 13:06:45 -07:00
scsi_rpc.c scsi: import SCSI/blockdev translation layer 2016-08-01 10:35:01 -07:00
scsi.c event.h: split non-public API into spdk_internal 2017-01-05 11:57:18 -07:00
task.c scsi: only generate sense data for Check Condition 2017-01-19 09:39:26 -07:00