nvme: only process io_msg in primary process

The io_msg qpair is allocated and managed by the
primary process, so don't try polling it from
secondary processes.

This fixes a bug where an SPDK target has configured
cuse, and we try to run fio (for example) as a
secondary process.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I48e2b89597196ce2ba1fc02ea3a7c76c5a33281a

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7482
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Jim Harris 2021-04-19 11:51:51 -07:00
parent f69367c788
commit 10feaff299

View File

@ -87,6 +87,10 @@ nvme_io_msg_process(struct spdk_nvme_ctrlr *ctrlr)
return 0;
}
if (!spdk_process_is_primary()) {
return 0;
}
spdk_nvme_qpair_process_completions(ctrlr->external_io_msgs_qpair, 0);
count = spdk_ring_dequeue(ctrlr->external_io_msgs, requests,