From: Keith Busch Date: Thu, 11 Feb 2016 20:05:47 +0000 (-0700) Subject: NVMe: Rate limit nvme IO warnings X-Git-Tag: v4.1.12-102.0.20170601_1400~124 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4d50d3a51d89c99c4e487d5a3642668506208844;p=users%2Fjedix%2Flinux-maple.git NVMe: Rate limit nvme IO warnings We don't need to spam the kernel logs with thousands of IO cancelling messages. We can infer all IO's are being cancelled with fewer, or even none at all. This patch rate limits the message and uses the debug log level as it is mainly used for testing purposes. Signed-off-by: Keith Busch Signed-off-by: Jens Axboe (cherry picked from commit f8e68a7c9af5f8047f7f8295874bedf306063709) Orabug: 25130845 Signed-off-by: Ashok Vairavan Reviewed-by: Martin K. Petersen --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 283a58c12edd0..06c323d2abc5a 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1030,7 +1030,7 @@ static void nvme_cancel_queue_ios(struct request *req, void *data, bool reserved if (!blk_mq_request_started(req)) return; - dev_warn(nvmeq->dev->ctrl.device, + dev_dbg_ratelimited(nvmeq->dev->ctrl.device, "Cancelling I/O %d QID %d\n", req->tag, nvmeq->qid); status = NVME_SC_ABORT_REQ;