diff options
author | Chris Mason <chris.mason@oracle.com> | 2009-04-27 07:29:05 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-04-27 07:41:47 -0400 |
commit | 193f284d4985db0370a8a1bbdfb20df548cf9ffb (patch) | |
tree | dfa8aec1c8000e5e00deb4eee4dc385a405d74a6 /fs/btrfs/inode.c | |
parent | b7967db75a38df4891b22efe1b0969b9357eb946 (diff) |
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>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2fdb2995be64..552e08afc7fb 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -1823,10 +1823,12 @@ good: | |||
1823 | return 0; | 1823 | return 0; |
1824 | 1824 | ||
1825 | zeroit: | 1825 | zeroit: |
1826 | printk(KERN_INFO "btrfs csum failed ino %lu off %llu csum %u " | 1826 | if (printk_ratelimit()) { |
1827 | "private %llu\n", page->mapping->host->i_ino, | 1827 | printk(KERN_INFO "btrfs csum failed ino %lu off %llu csum %u " |
1828 | (unsigned long long)start, csum, | 1828 | "private %llu\n", page->mapping->host->i_ino, |
1829 | (unsigned long long)private); | 1829 | (unsigned long long)start, csum, |
1830 | (unsigned long long)private); | ||
1831 | } | ||
1830 | memset(kaddr + offset, 1, end - start + 1); | 1832 | memset(kaddr + offset, 1, end - start + 1); |
1831 | flush_dcache_page(page); | 1833 | flush_dcache_page(page); |
1832 | kunmap_atomic(kaddr, KM_USER0); | 1834 | kunmap_atomic(kaddr, KM_USER0); |