Spdk/lib/bdev
yangtianyu 00383654 1dd07870e3 bdev/null : Clean up module resources that failed to initialize.
Currently, if the Bdev subsystem initialization fails, the initialization failed
module does not call the fini function cleanup resource.

However, null module use the 'spdk_io_device_register' and spdk_zmalloc to request
resources. In failed path, it will cause resource leak when exiting the app.

To avoid this, it will cleanup resources when module initialization fails.

Change-Id: Ib1a89e5238252d69b6e64ea02a0bd826661349a5
Signed-off-by: Tianyu Yang <yangtianyu2@huawei.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450105
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 22:25:47 +00:00
..
aio bdev/aio: cleanup bdev_aio.h 2019-03-01 13:03:55 +00:00
compress bdev/compress: return error to reducelib if comp/decomp fails 2019-04-24 15:07:37 +00:00
crypto bdev/crypto: add new uninit call needed for dpdk 19.02 2019-04-24 22:00:10 +00:00
error bdev: make spdk_bdev_register_module_xxx function names predictable 2019-02-11 23:56:53 +00:00
gpt bdev: switch to spdk_*malloc(). 2019-04-09 06:30:42 +00:00
iscsi bdev/iscsi: fix iscsi bdev wrong lun id 2019-04-01 01:16:51 +00:00
lvol bdev: deprecate spdk_vbdev_register 2019-04-04 08:28:31 +00:00
malloc bdev: Make malloc bdev use the new zero copy mechanism 2019-04-23 18:38:39 +00:00
null bdev/null : Clean up module resources that failed to initialize. 2019-04-24 22:25:47 +00:00
nvme bdev/nvme: fix issue about coredump which caused by assert error. 2019-04-22 15:23:11 +00:00
ocf ocf: update try-locks in env 2019-04-19 13:05:35 +00:00
passthru bdev: deprecate spdk_vbdev_register 2019-04-04 08:28:31 +00:00
pmem bdev: process failure of spdk_bdev_io_get_buf_cb in each bdev module 2019-02-27 07:28:15 +00:00
raid bdev/raid: Add callback parameters to remove_base_devices() 2019-04-10 20:41:57 +00:00
rbd bdev: process failure of spdk_bdev_io_get_buf_cb in each bdev module 2019-02-27 07:28:15 +00:00
rpc bdev: remove delete_bdev RPC 2019-03-01 08:50:07 +00:00
split bdev: make spdk_bdev_register_module_xxx function names predictable 2019-02-11 23:56:53 +00:00
uring bdev: Add io_uring bdev module 2019-03-22 18:51:48 +00:00
virtio virtio: switch to spdk_*malloc(). 2019-03-28 07:39:31 +00:00
bdev.c bdev: Emulate zero copy support when necessary 2019-04-23 18:38:39 +00:00
Makefile bdev/compress: add compression vbdev module 2019-03-27 14:51:22 +00:00
part.c bdev: deprecate spdk_vbdev_register 2019-04-04 08:28:31 +00:00
scsi_nvme.c bdev: move error union to internal spdk_bdev_io struct 2018-06-26 20:04:07 +00:00
vtune.c mk: don't use '-include spdk/config.h' 2018-10-02 23:13:32 +00:00