test/nvme: check_io after reset without setting long time

Make it easier to reproduce issue #819 without setting long time.
To decrease the UT time.

Change-Id: I3dd0268a894113e1a12395618721afee6137588d
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457914
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
JinYu 2019-06-13 21:22:58 +08:00 committed by Changpeng Liu
parent cf5c4a8a2e
commit 2224554eec

View File

@ -287,17 +287,6 @@ work_fn(void *arg)
}
while (1) {
/*
* Check for completed I/O for each controller. A new
* I/O will be submitted in the io_complete callback
* to replace each I/O that is completed.
*/
ns_ctx = worker->ns_ctx;
while (ns_ctx != NULL) {
check_io(ns_ctx);
ns_ctx = ns_ctx->next;
}
if (!did_reset && ((tsc_end - spdk_get_ticks()) / g_tsc_rate) > (uint64_t)g_time_in_sec / 2) {
ns_ctx = worker->ns_ctx;
while (ns_ctx != NULL) {
@ -310,6 +299,17 @@ work_fn(void *arg)
did_reset = true;
}
/*
* Check for completed I/O for each controller. A new
* I/O will be submitted in the io_complete callback
* to replace each I/O that is completed.
*/
ns_ctx = worker->ns_ctx;
while (ns_ctx != NULL) {
check_io(ns_ctx);
ns_ctx = ns_ctx->next;
}
if (spdk_get_ticks() > tsc_end) {
break;
}