Commit c3b47725 authored by Pan Liu's avatar Pan Liu Committed by Daniel Verkamp
Browse files

don't attach inactive namespace in fio plugin, in order to avoid IO error.



Change-Id: Id259261d387998f332dee11dca740ecaba311de4
Signed-off-by: default avatarPan Liu <liupan1111@gmail.com>
Reviewed-on: https://review.gerrithub.io/399274


Reviewed-by: default avatarGangCao <gang.cao@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarZiye Yang <optimistyzy@gmail.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 33285599
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -159,6 +159,12 @@ attach_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid,
		return;
	}

	if (!spdk_nvme_ns_is_active(ns)) {
		SPDK_ERRLOG("Inactive namespace by ns_id=%d\n", ns_id);
		g_error = true;
		return;
	}

	fio_qpair = fio_thread->fio_qpair;
	while (fio_qpair != NULL) {
		if ((fio_qpair->f == f) ||