[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <41041f049985675f95a38bdd8bb998c5a4ab140c.1685350577.git.chunguang.xu@shopee.com>
Date: Mon, 29 May 2023 18:59:24 +0800
From: "brookxu.cn" <brookxu.cn@...il.com>
To: kbusch@...nel.org, axboe@...nel.dk, hch@....de, sagi@...mberg.me
Cc: linux-nvme@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [RFC PATCH 2/4] nvme: donot retry request for NVME_CTRL_DELETING_NOIO
From: Chunguang Xu <chunguang.xu@...pee.com>
According to NVME_CTRL_DELETING_NOIO definition, we should
not requeue any request while controller at this state.
Signed-off-by: Chunguang Xu <chunguang.xu@...pee.com>
---
drivers/nvme/host/core.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 1f0cbb77b249..304eb4eda6c4 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -346,6 +346,8 @@ enum nvme_disposition {
static inline enum nvme_disposition nvme_decide_disposition(struct request *req)
{
+ struct nvme_ctrl *ctrl = nvme_req(req)->ctrl;
+
if (likely(nvme_req(req)->status == 0))
return COMPLETE;
@@ -362,7 +364,8 @@ static inline enum nvme_disposition nvme_decide_disposition(struct request *req)
blk_queue_dying(req->q))
return FAILOVER;
} else {
- if (blk_queue_dying(req->q))
+ if (ctrl->state == NVME_CTRL_DELETING_NOIO ||
+ blk_queue_dying(req->q))
return COMPLETE;
}
--
2.25.1
Powered by blists - more mailing lists