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

Change-Id: Id259261d387998f332dee11dca740ecaba311de4
Signed-off-by: Pan Liu <liupan1111@gmail.com>
Reviewed-on: https://review.gerrithub.io/399274
Reviewed-by: GangCao <gang.cao@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Pan Liu 2018-02-10 12:55:26 +08:00 committed by Daniel Verkamp
parent 33285599ef
commit c3b4772590

View File

@ -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) ||