Commit 9765e956 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

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: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: Id49b64aa1ee545874d7230399a5127c47f217836
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6076


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarsunshihao <sunshihao@huawei.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent bb15f826
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1316,10 +1316,14 @@ 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",
		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);
}