aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAsutosh Das <asutoshd@codeaurora.org>2013-03-07 17:43:35 +0530
committerZiyan <jaraidaniel@gmail.com>2016-01-08 10:42:59 +0100
commit787a2e7caf9727a4807bbb83dcee1091d68270c2 (patch)
tree31ca56db2d4c7fd38b641a684a1ba0d669a67fa7 /block
parent6932c4898863d85fafd4f7092d6350ff6752de94 (diff)
downloadkernel_samsung_tuna-787a2e7caf9727a4807bbb83dcee1091d68270c2.zip
kernel_samsung_tuna-787a2e7caf9727a4807bbb83dcee1091d68270c2.tar.gz
kernel_samsung_tuna-787a2e7caf9727a4807bbb83dcee1091d68270c2.tar.bz2
block: blk-core: add printk_ratelimit
On failure of requests the console is flooded with prints, which result in a watchdog bark. This patch limits the number of prints to console thus, avoiding the bark. CRs-Fixed: 458071 Change-Id: I614002cc1305ab7b5c6a64d278139291c1baa3c4 Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 7df4ef1..6f2357c 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -29,6 +29,7 @@
#include <linux/fault-inject.h>
#include <linux/list_sort.h>
#include <linux/delay.h>
+#include <linux/ratelimit.h>
#define CREATE_TRACE_POINTS
#include <trace/events/block.h>
@@ -2129,9 +2130,11 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
error_type = "I/O";
break;
}
- printk(KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
- error_type, req->rq_disk ? req->rq_disk->disk_name : "?",
- (unsigned long long)blk_rq_pos(req));
+ printk_ratelimited(
+ KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
+ error_type,
+ req->rq_disk ? req->rq_disk->disk_name : "?",
+ (unsigned long long)blk_rq_pos(req));
}
blk_account_io_completion(req, nr_bytes);