Spdk/examples
Mike Gerdts 9e96e331c3 fio_plugin: initalize when create_serialize=0
When the fio plugin is used with reate_serialize set to false, fio calls
the init callback (spdk_fio_init()) before calling the setup callback
(spdk_fio_setup()). When create_serialize is true, spdk_fio_setup() is
called earlier.  Both spdk_fio_setup() and spdk_fio_init() call
functions that require that the SPDK libraries have been initialized.

While it is arguably a bug in SPDK that per-thread initialization
happens before global initialization, it is not terribly difficult to
work around in fio_plugin. The workaround implemented in this patch
splits the start of the plugin's init thread into its own function and
calls it from both spdk_fio_setup() and spdk_fio_init(). The init thread
is started while holding a mutex, and as before there is a guard to be
sure that the init thread is created only once.

Fixes issue #2843

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I20d1863a88b75b416283f9466ee1186d8ef05063
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16053
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2023-01-11 09:17:16 +00:00
..
accel examples/accel_perf: correct the unlock operation 2022-12-20 09:19:28 +00:00
bdev fio_plugin: initalize when create_serialize=0 2023-01-11 09:17:16 +00:00
blob add Intel copyright notices (and/or SPDX lic) where missing 2022-11-10 08:28:53 +00:00
idxd update Intel copyright notices 2022-11-10 08:28:53 +00:00
interrupt_tgt Add SPDX header to various files 2022-11-29 08:27:51 +00:00
ioat update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme hotplug: let device insertions/removals take priority 2023-01-09 11:16:50 +00:00
nvmf examples/nvmf: explicitly set the initial value for local variables 2022-12-13 09:26:18 +00:00
sock examples/sock: close the right sock object 2022-12-16 09:26:11 +00:00
util add Intel copyright notices (and/or SPDX lic) where missing 2022-11-10 08:28:53 +00:00
vmd examples/vmd: Add nvme library to VMD example apps 2022-12-05 09:35:14 +00:00
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00