summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorSagi Grimberg <sagi@grimberg.me>2017-03-29 20:54:15 +0300
committerJens Axboe <axboe@fb.com>2017-04-04 09:48:23 -0600
commit7d9a5e7176c60673b283bdb0e507d288b48d9528 (patch)
tree6af9e45104d44371a654bb9bf8ed6796e6f2cd3b /drivers/nvme
parente806666e25dc29f81b659e12386f6168488fa9a6 (diff)
nvme-loop: increment request retries counter before requeuing
This way our max retry limit holds as well. Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/target/loop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
index 35314d96b4db..88a1927bcf6f 100644
--- a/drivers/nvme/target/loop.c
+++ b/drivers/nvme/target/loop.c
@@ -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;
}