Spdk/lib/bdev
Andrey Kuzmin 9abd8becc5 Avoid scheduling removal of the same bdev descriptor multiple times.
Deferred descriptor removal invocation under bdev_unregister() does
not account for the possibility of bdev_unregister being entered
multiple times for the same bdev (which is possible thanks to multiple
paths to unregistration - consider bdev hotremove callback and
_spdk_bdev_finish_unregister_bdevs_iter iterator - being present).
Therefore, currently nothing prevents _remove_notify for the same bdev
descriptor from being scheduled multiple times.

This commit adds boolean remove_scheduled field to struct spdk_bdev_desc.
The value is set when remove_notify for the descriptor is being
scheduled for the first time, and checked on subsequent attempts.

Change-Id: If2c5a365c05c4123c50edf5a2db164be9dd26f8e
Signed-off-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Reviewed-on: https://review.gerrithub.io/415319
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 17:47:05 +00:00
..
aio thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
error bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h 2018-05-25 16:02:22 +00:00
gpt thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
iscsi iscsi initiator: remove the deleted variable. 2018-06-14 02:54:27 +00:00
lvol bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h 2018-05-25 16:02:22 +00:00
malloc thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
null thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
nvme bdev/nvme: remove redundant check for active NS 2018-06-12 19:37:04 +00:00
passthru thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
pmem bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h 2018-05-25 16:02:22 +00:00
rbd bdev/rbd: destroy ioctx in bdev_rbd_init 2018-06-14 21:31:06 +00:00
rpc bdev/rpc: make get_bdevs_iostat name param optional 2018-05-25 23:26:59 +00:00
split thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
virtio thread: Replace #include of io_channel.h with thread.h 2018-06-12 15:24:07 +00:00
bdev.c Avoid scheduling removal of the same bdev descriptor multiple times. 2018-06-15 17:47:05 +00:00
Makefile bdev/pmem: change all NVML strings to PMDK 2018-04-07 00:07:57 -04:00
part.c bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h 2018-05-25 16:02:22 +00:00
scsi_nvme.c bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h 2018-05-25 16:02:22 +00:00
vtune.c bdev: disable new GCC 7 warning in VTune code 2018-03-19 15:58:15 -04:00