Spdk/lib/vhost
Shuhei Matsumoto 0238bb734a lib/vhost_blk: Open bdev by bdev_name first in spdk_vhost_blk_construct()
Open a bdev whose name matches bdev_name first in spdk_vhost_blk_construct()
to avoid using spdk_bdev_get_by_name() to fix the race condition
due to the time gap between spdk_bdev_get_by_name() and spdk_bdev_open_ext().
A pointer to a bdev is valid only while the bdev is opened.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I99fedd696aa44bb46c1fcc4f49ca37069f7adfef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4502
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-14 08:07:06 +00:00
..
Makefile lib/vhost: Remove and inline spdk_vhost_blk_get_dev 2020-06-08 09:28:27 +00:00
rte_vhost_compat.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
spdk_vhost.map lib/vhost: Remove and inline spdk_vhost_blk_get_dev 2020-06-08 09:28:27 +00:00
vhost_blk.c lib/vhost_blk: Open bdev by bdev_name first in spdk_vhost_blk_construct() 2020-10-14 08:07:06 +00:00
vhost_internal.h vhost: set the packed ring as default 2020-06-12 15:45:27 +00:00
vhost_nvme.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
vhost_rpc.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
vhost_scsi.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
vhost.c log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00