nvme_perf: separate read/write error messages

Next patch will add rate limiting on some of the
error messages.  Separating the read error message
from the write error message will allow us to
rate limit them independently.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id49b64aa1ee545874d7230399a5127c47f217836
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6076
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Jim Harris 2021-01-25 16:02:35 +00:00 committed by Tomasz Zawadzki
parent bb15f82631
commit 9765e956b9

View File

@ -1316,9 +1316,13 @@ io_complete(void *ctx, const struct spdk_nvme_cpl *cpl)
struct perf_task *task = ctx;
if (spdk_unlikely(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);
if (task->is_read) {
fprintf(stderr, "Read completed with error (sct=%d, sc=%d)\n",
cpl->status.sct, cpl->status.sc);
} else {
fprintf(stderr, "Write completed with error (sct=%d, sc=%d)\n",
cpl->status.sct, cpl->status.sc);
}
}
task_complete(task);