Spdk/test/unit/lib/bdev
Jim Harris cf64422ad7 bdev: call unregister callback on correct thread
We should always called the unregister callback on
the same thread that spdk_bdev_unregister() was
originally called.  So save the thread pointer and
use an spdk_thread_send_msg() to make sure it gets
called on the correct thread when the unregister
finishes.

Also add unit test that reproduces the original
issue.

Fixes issue #2883.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib3d89368aa358bc7a8db46a8a8cb6339340469d9

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16554
Reviewed-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2023-01-27 08:45:28 +00:00
..
bdev_zone.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev.c bdev: add claim type 2023-01-05 23:28:32 +00:00
compress.c bdev/compress: Port to use accel_fw instead of compressdev 2023-01-20 10:26:21 +00:00
crypto.c bdev/crypto: Use accel framework 2023-01-19 22:00:58 +00:00
gpt update Intel copyright notices 2022-11-10 08:28:53 +00:00
mt bdev: call unregister callback on correct thread 2023-01-27 08:45:28 +00:00
nvme bdev_nvme: record io paths' stat before being destroyed 2023-01-19 01:57:11 +00:00
part.c lib/part: check the return of spdk_bdev_register 2023-01-18 15:15:02 +00:00
pmem update Intel copyright notices 2022-11-10 08:28:53 +00:00
raid bdev/raid0: Support resize when increasing the size of base bdevs 2023-01-17 19:45:34 +00:00
scsi_nvme.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
vbdev_lvol.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
vbdev_zone_block.c bdev: add claim type 2023-01-05 23:28:32 +00:00
Makefile configure: rename --with-reduce --with-vbdev-compress 2022-12-08 12:55:27 +00:00