Skip to content

Commit

Permalink
nvme-loop: increment request retries counter before requeuing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sagi Grimberg authored and Jens Axboe committed Apr 4, 2017
1 parent e806666 commit 7d9a5e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nvme/target/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7d9a5e7

Please sign in to comment.