+8
−14
Loading
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>