Spdk/test/unit/lib/bdev
Darek Stojaczyk f93b6fb0a4 bdev: defer unregister untill *all* descriptors are closed
We used to wait only for those descriptors which
specified the hotremove notification callback. The
bdev could've been removed before the descriptor
was closed and the subsequent spdk_bdev_close would
simply segfault.

This patch modifies spdk_bdev_unregister to always
wait for all descriptors to be closed before actually
unregistering the bdev. This consolidates the bdev
unregister behavior for descriptors with and without
the hotremove callback.

Change-Id: I9b358209c6abd301b6fe8660e27bc6fa4ef485d6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 17:06:37 +00:00
..
bdev_raid.c bdev/raid: Add callback parameters to remove_base_devices() 2019-04-10 20:41:57 +00:00
bdev.c bdev: deprecate spdk_vbdev_register 2019-04-04 08:28:31 +00:00
compress.c bdev/compress: add missing mocks and re-enable UT build for comp 2019-04-22 15:44:38 +00:00
crypto.c crypto: switch to spdk_*malloc(). 2019-04-04 20:59:36 +00:00
gpt test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
mt bdev: defer unregister untill *all* descriptors are closed 2019-04-23 17:06:37 +00:00
part.c notify: add basic unit tests for notifications 2019-03-29 21:15:14 +00:00
pmem bdev: Not assert but pass completion status to spdk_bdev_io_get_buf_cb 2019-02-27 01:59:11 +00:00
scsi_nvme.c test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
vbdev_lvol.c bdev: deprecate spdk_vbdev_register 2019-04-04 08:28:31 +00:00
Makefile bdev/compress: add missing mocks and re-enable UT build for comp 2019-04-22 15:44:38 +00:00