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>
This commit is contained in:
Sagi Grimberg 2017-03-29 20:54:15 +03:00 committed by Jens Axboe
parent e806666e25
commit 7d9a5e7176
1 changed files with 1 additions and 0 deletions

View 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;
}