]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nvme: Limit command retries
authorKeith Busch <keith.busch@intel.com>
Tue, 12 Jul 2016 23:20:31 +0000 (16:20 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 12 Jul 2016 23:20:31 +0000 (16:20 -0700)
commitf80ec966c19b78af4360e26e32e1ab775253105f
treed8aacd28080c9c48ee7afef3753fa9f4c1840a19
parent7a6497378ae832daa1668a10be04ebdacd60468b
nvme: Limit command retries

Many controller implementations will return errors to commands that will
not succeed, but without the DNR bit set. The driver previously retried
these commands an unlimited number of times until the command timeout
has exceeded, which takes an unnecessarilly long period of time.

This patch limits the number of retries a command can have, defaulting
to 5, but is user tunable at load or runtime.

The struct request's 'retries' field is used to track the number of
retries attempted. This is in contrast with scsi's use of this field,
which indicates how many retries are allowed.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c