mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Btrfs: ratelimit IO error printks
Btrfs has printks for various IO errors, including bad checksums and mismatches between what we expect the block headers to contain and what we actually find on the disk. Longer term we need a real reporting mechanism for this, but for now printk is going to have to do. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
b7967db75a
commit
193f284d49
2 changed files with 31 additions and 17 deletions
|
@ -1823,10 +1823,12 @@ good:
|
|||
return 0;
|
||||
|
||||
zeroit:
|
||||
printk(KERN_INFO "btrfs csum failed ino %lu off %llu csum %u "
|
||||
"private %llu\n", page->mapping->host->i_ino,
|
||||
(unsigned long long)start, csum,
|
||||
(unsigned long long)private);
|
||||
if (printk_ratelimit()) {
|
||||
printk(KERN_INFO "btrfs csum failed ino %lu off %llu csum %u "
|
||||
"private %llu\n", page->mapping->host->i_ino,
|
||||
(unsigned long long)start, csum,
|
||||
(unsigned long long)private);
|
||||
}
|
||||
memset(kaddr + offset, 1, end - start + 1);
|
||||
flush_dcache_page(page);
|
||||
kunmap_atomic(kaddr, KM_USER0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue