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> |
||
---|---|---|
.. | ||
bdevperf | ||
fio_plugin | ||
hello_world | ||
Makefile |