Skip to content

Commit 92b98e8

Browse files
committed
nvme: Restart request timers in resetting state
A controller in the resetting state has not yet completed its recovery actions. The pci and fc transports were already handling this, so update the remaining transports to not attempt additional recovery in this state. Instead, just restart the request timer. Tested-by: Edmund Nadolski <[email protected]> Reviewed-by: James Smart <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 5d02a5c commit 92b98e8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/nvme/host/rdma.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,14 @@ nvme_rdma_timeout(struct request *rq, bool reserved)
17011701
dev_warn(ctrl->ctrl.device, "I/O %d QID %d timeout\n",
17021702
rq->tag, nvme_rdma_queue_idx(queue));
17031703

1704+
/*
1705+
* Restart the timer if a controller reset is already scheduled. Any
1706+
* timed out commands would be handled before entering the connecting
1707+
* state.
1708+
*/
1709+
if (ctrl->ctrl.state == NVME_CTRL_RESETTING)
1710+
return BLK_EH_RESET_TIMER;
1711+
17041712
if (ctrl->ctrl.state != NVME_CTRL_LIVE) {
17051713
/*
17061714
* Teardown immediately if controller times out while starting

drivers/nvme/host/tcp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,6 +2044,14 @@ nvme_tcp_timeout(struct request *rq, bool reserved)
20442044
struct nvme_tcp_ctrl *ctrl = req->queue->ctrl;
20452045
struct nvme_tcp_cmd_pdu *pdu = req->pdu;
20462046

2047+
/*
2048+
* Restart the timer if a controller reset is already scheduled. Any
2049+
* timed out commands would be handled before entering the connecting
2050+
* state.
2051+
*/
2052+
if (ctrl->ctrl.state == NVME_CTRL_RESETTING)
2053+
return BLK_EH_RESET_TIMER;
2054+
20472055
dev_warn(ctrl->ctrl.device,
20482056
"queue %d: timeout request %#x type %d\n",
20492057
nvme_tcp_queue_id(req->queue), rq->tag, pdu->hdr.type);

0 commit comments

Comments
 (0)