nvme-loop: increment request retries counter before requeuing
authorSagi Grimberg <sagi@grimberg.me>
Wed, 29 Mar 2017 17:54:15 +0000 (20:54 +0300)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:48:23 +0000 (09:48 -0600)
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>
drivers/nvme/target/loop.c

index 35314d96b4dbdb7415633dc8a0788c90cfc4ecad..88a1927bcf6f5941b087bacdbbd2c504f4581bf6 100644 (file)
@@ -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;
                }