summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2018-05-24 14:34:55 -0600
committerChristoph Hellwig <hch@lst.de>2018-05-30 08:04:25 +0200
commitb9cac43c2c4aab221ee0bac72bd6b9f8bf00a223 (patch)
tree44687428cd0246ad0419256886870519d2eaea3c /drivers/nvme
parentab4f47a9f4a12603a1806230d44ead2e54158f85 (diff)
downloadlinux-b9cac43c2c4aab221ee0bac72bd6b9f8bf00a223.tar.gz
linux-b9cac43c2c4aab221ee0bac72bd6b9f8bf00a223.tar.xz
nvme-pci: Rate limit the nvme timeout warnings
The block layer's timeout handling currently prevents drivers from completing commands outside the timeout callback once blk-mq decides they've expired. If a device breaks, this could potentially create many thousands of timed out commands. There's nothing of value to be gleaned from observing each of those messages, so this patch adds a rate limit on them. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index bca8f521f887..9cd62a13ff1f 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1227,7 +1227,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
switch (dev->ctrl.state) {
case NVME_CTRL_CONNECTING:
case NVME_CTRL_RESETTING:
- dev_warn(dev->ctrl.device,
+ dev_warn_ratelimited(dev->ctrl.device,
"I/O %d QID %d timeout, disable controller\n",
req->tag, nvmeq->qid);
nvme_dev_disable(dev, false);