Since bdev_examine() can happen on any thread and it happens without any other lock being held on the spdk_bdev_module, it is possible for multiple threads to try to simultaneously increment module->internal.action_in_progress. Decrements may also race. This commit adds bdev_module->internal.spinlock and holds it while modifying module->internal.action_in_progress. This can be removed when the bdev_register_examine_thread deprecation is removed. Change-Id: I9c401eeb3c7c97c484e16fa9cfd82668b32e508b Signed-off-by: Mike Gerdts <mgerdts@nvidia.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15281 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Community-CI: Mellanox Build Bot |
||
---|---|---|
.. | ||
bdev_internal.h | ||
bdev_rpc.c | ||
bdev_zone.c | ||
bdev.c | ||
Makefile | ||
part.c | ||
scsi_nvme.c | ||
spdk_bdev.map | ||
vtune.c |