Spdk/test/unit/lib/scsi
Shuhei Matsumoto ab808d2b68 lib/scsi: Pass bdev_name instead of bdev to scsi_lun_construct()
Pass not bdev but bdev_name to scsi_lun_construct() to fix the
race condition due to the time gap between spdk_bdev_get_by_name()
and spdk_bdev_open(). A pointer to a bdev is valid only while the
bdev is opened.

spdk_bdev_open() has been replaced recently by spdk_bdev_open_ext(),
but the issue still existed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic462422dbc2501c24907f56a36570fbb54fef65b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4482
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-08 13:11:15 +00:00
..
dev.c lib/scsi: Pass bdev_name instead of bdev to scsi_lun_construct() 2020-10-08 13:11:15 +00:00
lun.c lib/scsi: Pass bdev_name instead of bdev to scsi_lun_construct() 2020-10-08 13:11:15 +00:00
scsi_bdev.c scsi: add SPC2 RESERVE/RELEASE support 2020-06-25 07:16:08 +00:00
scsi_pr.c UT/scsi_reserve: add Persistent Reserve with SPC2 RESERVE/RELEASE test case 2020-06-25 07:16:08 +00:00
scsi.c ut: make use of CUnit macro to reduce duplications 2020-04-02 14:50:12 +00:00
Makefile UT/SCSI: add persistent reservation unit tests framework 2019-06-03 23:59:49 +00:00