[PATCH 1/3] nvme-tcp: Do not terminate commands when in RESETTING
Hannes Reinecke
hare at suse.de
Fri Sep 8 03:00:47 PDT 2023
When the error recovery started it will terminate all commands
anyway, so we should just return BLK_EH_RESET_TIMER for a
command timeout.
Signed-off-by: Hannes Reinecke <hare at suse.de>
---
drivers/nvme/host/tcp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 5b332d9f87fc..1faef1cf5c94 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -2274,6 +2274,14 @@ static enum blk_eh_timer_return nvme_tcp_timeout(struct request *rq)
nvme_tcp_queue_id(req->queue), nvme_cid(rq), pdu->hdr.type,
opc, nvme_opcode_str(qid, opc, fctype));
+ /*
+ * If the error recovery is started all commands will be
+ * aborted anyway, and nothing is to be done here.
+ */
+ if (ctrl->state == NVME_CTRL_RESETTING &&
+ work_pending(&to_tcp_ctrl(ctrl)->err_work))
+ return BLK_EH_RESET_TIMER;
+
if (ctrl->state != NVME_CTRL_LIVE) {
/*
* If we are resetting, connecting or deleting we should
--
2.35.3
More information about the Linux-nvme
mailing list