Spdk/examples
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
..
accel examples/accel/perf: fix partial-free error before _init_thread 2022-06-30 13:32:30 -04:00
bdev examples/bdev: add missed spdk_env_fini() call when exiting 2022-06-30 13:32:30 -04:00
blob examples/blobcli: remove a redundant error prompt 2022-06-30 13:32:29 -04:00
idxd examples/idxd: Deal with queued tasks during drain 2022-06-30 13:32:31 -04:00
interrupt_tgt interrupt_tgt: Fix the interrupt mode usage issue. 2021-07-13 08:59:41 +00:00
ioat examples/ioat: add missed spdk_env_fini() call when exiting 2022-06-30 13:32:30 -04:00
nvme nvme/fio_plugin: fix race during startup 2022-06-30 13:32:31 -04:00
nvmf examples/nvmf: add missed spdk_env_fini() when exiting 2022-06-30 13:32:30 -04:00
sock examples: update pollers to use the expected enum values 2022-06-30 13:32:27 -04:00
util Util: check the error case of NULL pointer 2021-06-08 08:26:12 +00:00
vmd examples/vmd: add missed spdk_env_fini() call when exiting 2022-06-30 13:32:30 -04:00
Makefile examples/idxd: Add the perf tool for idxd 2022-06-30 13:32:25 -04:00