Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137466653
D36921.id111599.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36921.id111599.diff
View Options
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -956,36 +956,44 @@
struct nvme_tracker *tr;
sbintime_t now;
bool idle;
+ bool expired;
uint32_t csts;
uint8_t cfs;
mtx_lock(&qpair->lock);
idle = TAILQ_EMPTY(&qpair->outstanding_tr);
+
again:
switch (qpair->recovery_state) {
case RECOVERY_NONE:
- if (idle)
- break;
+ /*
+ * Check to see if we need to timeout any commands. If we do, then
+ * we also enter a recovery phase.
+ */
now = getsbinuptime();
- idle = true;
+ expired = false;
TAILQ_FOREACH(tr, &qpair->outstanding_tr, tailq) {
if (tr->deadline == SBT_MAX)
continue;
idle = false;
if (now > tr->deadline) {
- /*
- * We're now passed our earliest deadline. We
- * need to do expensive things to cope, but next
- * time. Flag that and close the door to any
- * further processing.
- */
- qpair->recovery_state = RECOVERY_START;
- nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n",
- (uintmax_t)now, (uintmax_t)tr->deadline);
- break;
+ expired = true;
+ nvme_ctrlr_cmd_abort(ctrlr, tr->cid, qpair->id,
+ nvme_abort_complete, tr);
}
}
- break;
+ if (!expired)
+ break;
+
+ /*
+ * We're now passed our earliest deadline. We need to do
+ * expensive things to cope, but next time. Flag that
+ * and close the door to any further processing.
+ */
+ qpair->recovery_state = RECOVERY_START;
+ nvme_printf(ctrlr, "RECOVERY_START %jd vs %jd\n",
+ (uintmax_t)now, (uintmax_t)tr->deadline);
+ /* FALLTHROUGH */
case RECOVERY_START:
/*
* Read csts to get value of cfs - controller fatal status.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 24, 6:09 PM (9 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26068548
Default Alt Text
D36921.id111599.diff (1 KB)
Attached To
Mode
D36921: nvme: Timeout expired transactions
Attached
Detach File
Event Timeline
Log In to Comment