nvme_perf: stop sending I/O to hot removed namespaces

It may be an interesting test case to send I/O to hot
removed namespaces, but for a perf tool it seems better
to stop sending them once we get an INVALID_NAMESPACE
status code.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie458fa63b12114cf05d5a3f1702e37f91d8a00f6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6091
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Jim Harris 2021-01-26 06:21:01 +00:00 committed by Tomasz Zawadzki
parent d1c17064e7
commit d390808fd3

View File

@ -1346,6 +1346,11 @@ io_complete(void *ctx, const struct spdk_nvme_cpl *cpl)
RATELIMIT_LOG("Write completed with error (sct=%d, sc=%d)\n",
cpl->status.sct, cpl->status.sc);
}
if (cpl->status.sct == SPDK_NVME_SCT_GENERIC &&
cpl->status.sc == SPDK_NVME_SC_INVALID_NAMESPACE_OR_FORMAT) {
/* The namespace was hotplugged. Stop trying to send I/O to it. */
task->ns_ctx->is_draining = true;
}
}
task_complete(task);