Spdk/test/lib/scsi/dev
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
..
.gitignore scsi: import SCSI/blockdev translation layer 2016-08-01 10:35:01 -07:00
dev_ut.c scsi: handle return status of spdk_scsi_lun_claim(lun) 2017-02-16 11:03:48 +01:00
Makefile build: define SPDK_LIB_LIST to simplify building dependencies and linker args 2016-11-22 11:45:48 -07:00