nvme/perf: check nvme_register_io_thread() status

Do not continue running the thread work function if that thread could
not get an I/O queue.

Change-Id: I89033250bde0663f073ff35c76d1558d55b72ece
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2015-11-03 13:26:19 -07:00
parent c04ba5e952
commit a900f9ac9a

View File

@ -426,7 +426,10 @@ work_fn(void *arg)
printf("Starting thread on core %u\n", worker->lcore);
nvme_register_io_thread();
if (nvme_register_io_thread() != 0) {
fprintf(stderr, "nvme_register_io_thread() failed on core %u\n", worker->lcore);
return -1;
}
/* Submit initial I/O for each namespace. */
ns_ctx = worker->ns_ctx;