nvme-fc: increment request retries counter before requeuing
authorSagi Grimberg <sagi@grimberg.me>
Wed, 29 Mar 2017 17:54:46 +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/host/fc.c

index 7a1d7ea5366e791b56875d8f93d32ca422dc4bb2..bae10a95b1255b3cd1ab6cd62744ae8d85ca17a4 100644 (file)
@@ -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;
                }