numam-spdk/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
Makefile scsi: add bdev resize callback support 2020-09-28 08:33:18 +00:00
port.c lib/scsi: Remove spdk_ prefix from internal APIs 2020-04-16 08:09:14 +00:00
scsi_bdev.c scsi: add SPC2 RESERVE/RELEASE support 2020-06-25 07:16:08 +00:00
scsi_internal.h lib/scsi: Pass bdev_name instead of bdev to scsi_lun_construct() 2020-10-08 13:11:15 +00:00
scsi_pr.c scsi: add SPC2 RESERVE/RELEASE support 2020-06-25 07:16:08 +00:00
scsi_rpc.c lib/scsi: Remove spdk prefix from private functions 2020-04-16 08:09:14 +00:00
scsi.c lib/scsi: Remove spdk_ prefix from internal APIs 2020-04-16 08:09:14 +00:00
spdk_scsi.map scsi: add bdev resize callback support 2020-09-28 08:33:18 +00:00
task.c lib/scsi: Move scsi_task_free_data() in a file to remove function declaration 2019-11-21 08:01:29 +00:00