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

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent d1c17064
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);