numam-spdk/lib/nvmf
Shuhei Matsumoto a22d8a530f lib/nvmf: Add an API spdk_nvmf_subsystem_add_ns_ext() to pass bdev_name
Add an new API spdk_nvmf_subsystem_add_ns_ext() to pass not bdev but
bdev_name 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 by spdk_bdev_open_ext() but the
issue still existed.

Update the corresponding unit tests accordingly.

Then replace the internal of spdk_nvmf_subsystem_add_ns() by
spdk_nvmf_subsystem_add_ns_ext() call.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifcaa2121129ef22d5e61c9a8f7c640ff37a64485
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4485
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-14 08:07:06 +00:00
..
ctrlr_bdev.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
ctrlr_discovery.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
ctrlr.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
fc_ls.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
fc.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
Makefile build: cleanup LOCAL_SYS_LIBS for uuid 2020-09-29 09:36:25 +00:00
nvmf_fc.h nvmf: Remove new_qpair callback from transport accept function pointer 2020-06-18 07:29:41 +00:00
nvmf_internal.h nvmf: Getting or setting the allow_any_host parameter no longer requires 2020-10-13 07:48:12 +00:00
nvmf_rpc.c lib/nvmf: Add an API spdk_nvmf_subsystem_add_ns_ext() to pass bdev_name 2020-10-14 08:07:06 +00:00
nvmf.c nvmf: clear-out qpair during poll group add 2020-10-14 08:05:29 +00:00
rdma.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
spdk_nvmf.map lib/nvmf: Add an API spdk_nvmf_subsystem_add_ns_ext() to pass bdev_name 2020-10-14 08:07:06 +00:00
subsystem.c lib/nvmf: Add an API spdk_nvmf_subsystem_add_ns_ext() to pass bdev_name 2020-10-14 08:07:06 +00:00
tcp.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
transport.c nvmf/transport: Use mempool_get_bulk to feel pg cache 2020-09-09 07:19:50 +00:00
transport.h lib/nvmf: Add nvmf_transport_qpair_abort_request() 2020-07-14 07:54:42 +00:00