Commit a900f9ac authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent c04ba5e9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;