Skip to contentSkip to conversation

update request retries (loop, rdma, fc)

PATCH New Sagi Grimberg 3 participants 8 messages Mar 29, 2017 – Mar 30, 2017

Subsystems (3)
lore
Share & tools
lore

Sagi Grimberg

author maintainer
#0 lore raw

cover update request retries (loop, rdma, fc)

Keep a consistent behavior with what's checked in the core which does not requeue if we exhausted nvme_max_retries.

Sagi Grimberg (3):
nvme-rdma: increment request retries counter before requeuing
nvme-loop: increment request retries counter before requeuing
nvme-fc: increment request retries counter before requeuing

 drivers/nvme/host/fc.c     | 1 +
 drivers/nvme/host/rdma.c   | 1 +
 drivers/nvme/target/loop.c | 1 +
 3 files changed, 3 insertions(+)
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH 1/3 nvme-rdma: increment request retries counter before requeuing

This way our max retry limit holds as well.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/rdma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/host/rdma.c +1 -0
index a92791c485d1..c8f703e68d73 100644
@@ -1526,6 +1526,7 @@ static void nvme_rdma_complete_rq(struct request *rq)
 
 	if (unlikely(rq->errors)) {
 		if (nvme_req_needs_retry(rq, rq->errors)) {
+			rq->retries++;
 			nvme_requeue_req(rq);
 			return;
 		}
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/3 nvme-rdma: increment request retries counter before requeuing

Quoted 4 lines · Sagi Grimberg

This way our max retry limit holds as well.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>

---

Looks good

Reviewed-by Max Gurtovoy <maxg at mellanox.com>
author maintainer
#3 lore raw

PATCH 2/3 nvme-loop: increment request retries counter before requeuing

In reply to Sagi Grimberg

This way our max retry limit holds as well.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/target/loop.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/target/loop.c +1 -0
index 227a5320879e..6a54e387379e 100644
@@ -98,6 +98,7 @@ static void nvme_loop_complete_rq(struct request *req)
 
 	if (unlikely(req->errors)) {
 		if (nvme_req_needs_retry(req, req->errors)) {
+			req->retries++;
 			nvme_requeue_req(req);
 			return;
 		}
Signature · 1 line
2.7.4
#4 lore raw

PATCH 2/3 nvme-loop: increment request retries counter before requeuing

Quoted 4 lines · Sagi Grimberg

This way our max retry limit holds as well.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>

---

Looks good

Reviewed-by Max Gurtovoy <maxg at mellanox.com>
author maintainer
#5 lore raw

PATCH 3/3 nvme-fc: increment request retries counter before requeuing

In reply to Sagi Grimberg

This way our max retry limit holds as well.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>
---
 drivers/nvme/host/fc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvme/host/fc.c +1 -0
index 331ae9f8924d..2987f5ecd496 100644
@@ -1935,6 +1935,7 @@ nvme_fc_complete_rq(struct request *rq)
 
 	if (unlikely(rq->errors)) {
 		if (nvme_req_needs_retry(rq, rq->errors)) {
+			rq->retries++;
 			nvme_requeue_req(rq);
 			return;
 		}
Signature · 1 line
2.7.4
#6 lore raw

PATCH 3/3 nvme-fc: increment request retries counter before requeuing

Quoted 3 lines · Sagi Grimberg

This way our max retry limit holds as well.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>

Looks good

Reviewed-by Max Gurtovoy <maxg at mellanox.com>
#7 lore raw

cover update request retries (loop, rdma, fc)

In reply to Sagi Grimberg
Quoted 2 lines · Sagi Grimberg

Keep a consistent behavior with what's checked in the core which does not requeue if we exhausted nvme_max_retries.

Looks fine:

Reviewed-by Christoph Hellwig <hch at lst.de>

But we really need to move this to common code. I'll send a series to do that, but it will be on top of your series.