Spdk/examples/nvme
John Levon 5a3769e871 nvme/fio_plugin: fix race during startup
We can crash with spdk_nvme_qpair_process_completions(qpair=0x0) when
called from spdk_fio_getevents(). This was observed when passing more
than two namespaces to an fio job.

This is because this callback can be called concurrently with
spdk_fio_open(), which assigns ->qpair. We'll just skip any
non-initialized qpairs in the processing loop, as eventually
spdk_fio_open() will set them.

Fixes: "f69367c78 fio_nvme: defer qpair allocation to file_open callback"

Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12338 (master)

(cherry picked from commit a6aaf848a5)
Change-Id: Ie8f1ac37726e202bb971ffeb497f9e32656392aa
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12488
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-06-30 13:32:31 -04:00
..
abort examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
arbitration examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
cmb_copy examples/nvme/cmb_copy: exit the test tool if no controller found 2022-06-30 13:32:26 -04:00
discovery_aer examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
fio_plugin nvme/fio_plugin: fix race during startup 2022-06-30 13:32:31 -04:00
hello_world examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
hotplug examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
identify examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
nvme_manage examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
perf example/nvme_perf: Remove spdk_nvme_poll_group_remove() calls 2022-06-30 13:32:30 -04:00
pmr_persistence nvme: Add spdk_nvme_detach_poll() to simplify a common use case 2021-06-30 22:54:19 +00:00
reconnect examples/nvme: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
Makefile examples: add discovery_aer 2022-06-30 13:32:29 -04:00