numam-spdk/lib/util
Paul Luse 130d278adf blob: defer calling unload callback until dev is destroyed
Fixes condition where blobstore was prematurely calling the
application callback on spdk_bs_unload(), if the application
tries to do something too quickly bad things happen.

To avoid application changes with how the g_devlist_mutex is
held, it is no longer held while calling
_spdk_io_device_attempt_free() because the app unload CB is
called from that function and may want to call
spdk_io_device_unregister() from its unload CB.  So the lock
is now held and releases strictly around the list its
protecting which allows the CB from _spdk_io_device_attempt_free()
to be called without issue.

Change-Id: Ib451cfe6b33ea0c3f9e66c86785316f9d88837c7
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/377872
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-26 19:10:28 -04:00
..
bit_array.c env: Rename spdk_malloc/zmalloc/realloc/free to spdk_dma_(func) 2017-05-31 15:30:27 -04:00
crc32_ieee.c util: add CRC32 utility functions 2017-08-02 19:47:35 -04:00
crc32.c util: add CRC32 utility functions 2017-08-02 19:47:35 -04:00
crc32c.c util/crc32c: add SSE 4.2 CRC32 instruction support 2017-08-02 19:47:35 -04:00
fd.c util/fd: drop fallback from spdk_fd_get_blocklen() 2017-08-11 19:36:30 -04:00
io_channel.c blob: defer calling unload callback until dev is destroyed 2017-09-26 19:10:28 -04:00
Makefile util: add CRC32 utility functions 2017-08-02 19:47:35 -04:00
string.c lib: replace strerror with strerror_r 2017-08-15 16:47:01 -04:00