numam-spdk/lib/bdev
Shuhei Matsumoto cf8405fc24 bdev: Hold mutex while removing name from name tree
We had not held mutex while removing bdev name or alias from bdev
name tree for most cases. Fix these in this patch.

spdk_bdev_unregister() already holds g_bdev_mgr.mutex when removing
name, and so we do not need to change it.

spdk_bdev_close() had not held g_bdev_mgr.mutex. What we want to lock
is only when removing name from name tree, that is, calling
bdev_name_del() in bdev_unregister_unsafe(). However, we need to
keep hierarchical lock ordering. Hence get and free g_bdev_mgr.mutex
outside of bdev->internal.mutex.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e2c8604e27c8603725efa9bc0bee2013eccb2ac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8527
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-07-12 15:30:39 +00:00
..
bdev_internal.h bdev: rename spdk_bdev_get_io to bdev_channel_get_io 2019-11-20 09:34:18 +00:00
bdev_rpc.c bdev: speed up bdev name lookup by using rbtree 2021-05-26 09:22:06 +00:00
bdev_zone.c bdev/zone: add support for get num zones 2021-04-26 16:16:42 +00:00
bdev.c bdev: Hold mutex while removing name from name tree 2021-07-12 15:30:39 +00:00
Makefile nvmf: Support physical block size if exposed by bdev 2021-05-06 07:14:40 +00:00
part.c lib/bdev: Added iov to spdk_bdev_zcopy_start 2021-06-04 20:10:07 +00:00
scsi_nvme.c nvme: fix command specific status code 2020-02-20 09:49:24 +00:00
spdk_bdev.map bdev: remove all references to spdk_bdev_open 2021-05-20 15:02:59 +00:00
vtune.c