mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
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>
This commit is contained in:
parent
8836e8544e
commit
75de0c3709
1 changed files with 6 additions and 3 deletions
|
@ -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>
|
||||
|
@ -2203,9 +2204,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);
|
||||
|
|
Loading…
Reference in a new issue