Commit cdb3a594 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

nvme: ignore requests submitted before timeout set



If requests are in flight at the time a timeout callback is configured,
we can't retroactively get the submission time of those requests; treat
them as not having a timeout.

Change-Id: Ic589e874a0f2c8c7f4ce352afa7c3aea33b01fae
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413863


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent e7b29a14
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1171,6 +1171,8 @@ nvme_pcie_qpair_submit_tracker(struct spdk_nvme_qpair *qpair, struct nvme_tracke
	req->timed_out = false;
	if (spdk_unlikely(pctrlr->ctrlr.timeout_enabled)) {
		req->submit_tick = spdk_get_ticks();
	} else {
		req->submit_tick = 0;
	}

	pqpair->tr[tr->cid].active = true;
@@ -2001,7 +2003,7 @@ nvme_pcie_qpair_check_timeout(struct spdk_nvme_qpair *qpair)
	TAILQ_FOREACH_SAFE(tr, &pqpair->outstanding_tr, tq_list, tmp) {
		assert(tr->req != NULL);

		if (tr->req->timed_out) {
		if (tr->req->timed_out || tr->req->submit_tick == 0) {
			continue;
		}