nvme_perf: Check completion status for each IO

Perf tool had checked status of each NVMe IO command submission but
had not checked completion status of each NVMe IO command processing.

This patch checks the completion status of each NVMe IO command
processing and prints error if found.

No error handling is not implemented yet but this addtion will be
of any help for subsequent DIF patches.

Change-Id: I8da52d97584d7688cff04092efee658556cf7d86
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/439966
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-01-15 10:35:09 +09:00 committed by Jim Harris
parent 3f836b036f
commit 113798376d

View File

@ -619,7 +619,7 @@ task_extended_lba_pi_verify(struct ns_entry *entry, struct perf_task *task,
}
}
static void io_complete(void *ctx, const struct spdk_nvme_cpl *completion);
static void io_complete(void *ctx, const struct spdk_nvme_cpl *cpl);
static __thread unsigned int seed = 0;
@ -738,9 +738,17 @@ task_complete(struct perf_task *task)
}
static void
io_complete(void *ctx, const struct spdk_nvme_cpl *completion)
io_complete(void *ctx, const struct spdk_nvme_cpl *cpl)
{
task_complete((struct perf_task *)ctx);
struct perf_task *task = ctx;
if (spdk_nvme_cpl_is_error(cpl)) {
fprintf(stderr, "%s completed with error (sct=%d, sc=%d)\n",
task->is_read ? "Read" : "Write",
cpl->status.sct, cpl->status.sc);
}
task_complete(task);
}
static void