diff --git a/examples/nvme/fio_plugin/fio_plugin.c b/examples/nvme/fio_plugin/fio_plugin.c index e2d8934bb..e37eeeb7b 100644 --- a/examples/nvme/fio_plugin/fio_plugin.c +++ b/examples/nvme/fio_plugin/fio_plugin.c @@ -1165,6 +1165,15 @@ static int spdk_fio_getevents(struct thread_data *td, unsigned int min, } while (fio_qpair != NULL) { + /* + * We can be called while spdk_fio_open()s are still + * ongoing, in which case, ->qpair can still be NULL. + */ + if (fio_qpair->qpair == NULL) { + fio_qpair = TAILQ_NEXT(fio_qpair, link); + continue; + } + spdk_nvme_qpair_process_completions(fio_qpair->qpair, max - fio_thread->iocq_count); if (fio_thread->iocq_count >= min) {