diff options
author | David Sterba <dsterba@suse.cz> | 2011-05-06 09:33:15 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-05-12 12:08:38 -0400 |
commit | 7a36ddec1003a4e84e79f28ee714a142ed6bc529 (patch) | |
tree | a3418ebd771d4c0f25b07c281158548640cd1f7c /fs/btrfs/disk-io.c | |
parent | 182608c8294b5fe90d7bbd4b026c82bf0a24b736 (diff) |
btrfs: use printk_ratelimited instead of printk_ratelimit
As per printk_ratelimit comment, it should not be used.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index de7b4770ab17..cb9d1b8bfe74 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/crc32c.h> | 29 | #include <linux/crc32c.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/migrate.h> | 31 | #include <linux/migrate.h> |
32 | #include <linux/ratelimit.h> | ||
32 | #include <asm/unaligned.h> | 33 | #include <asm/unaligned.h> |
33 | #include "compat.h" | 34 | #include "compat.h" |
34 | #include "ctree.h" | 35 | #include "ctree.h" |
@@ -254,14 +255,12 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf, | |||
254 | memcpy(&found, result, csum_size); | 255 | memcpy(&found, result, csum_size); |
255 | 256 | ||
256 | read_extent_buffer(buf, &val, 0, csum_size); | 257 | read_extent_buffer(buf, &val, 0, csum_size); |
257 | if (printk_ratelimit()) { | 258 | printk_ratelimited(KERN_INFO "btrfs: %s checksum verify " |
258 | printk(KERN_INFO "btrfs: %s checksum verify " | ||
259 | "failed on %llu wanted %X found %X " | 259 | "failed on %llu wanted %X found %X " |
260 | "level %d\n", | 260 | "level %d\n", |
261 | root->fs_info->sb->s_id, | 261 | root->fs_info->sb->s_id, |
262 | (unsigned long long)buf->start, val, found, | 262 | (unsigned long long)buf->start, val, found, |
263 | btrfs_header_level(buf)); | 263 | btrfs_header_level(buf)); |
264 | } | ||
265 | if (result != (char *)&inline_result) | 264 | if (result != (char *)&inline_result) |
266 | kfree(result); | 265 | kfree(result); |
267 | return 1; | 266 | return 1; |
@@ -296,13 +295,11 @@ static int verify_parent_transid(struct extent_io_tree *io_tree, | |||
296 | ret = 0; | 295 | ret = 0; |
297 | goto out; | 296 | goto out; |
298 | } | 297 | } |
299 | if (printk_ratelimit()) { | 298 | printk_ratelimited("parent transid verify failed on %llu wanted %llu " |
300 | printk("parent transid verify failed on %llu wanted %llu " | ||
301 | "found %llu\n", | 299 | "found %llu\n", |
302 | (unsigned long long)eb->start, | 300 | (unsigned long long)eb->start, |
303 | (unsigned long long)parent_transid, | 301 | (unsigned long long)parent_transid, |
304 | (unsigned long long)btrfs_header_generation(eb)); | 302 | (unsigned long long)btrfs_header_generation(eb)); |
305 | } | ||
306 | ret = 1; | 303 | ret = 1; |
307 | clear_extent_buffer_uptodate(io_tree, eb, &cached_state); | 304 | clear_extent_buffer_uptodate(io_tree, eb, &cached_state); |
308 | out: | 305 | out: |
@@ -533,12 +530,10 @@ static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
533 | 530 | ||
534 | found_start = btrfs_header_bytenr(eb); | 531 | found_start = btrfs_header_bytenr(eb); |
535 | if (found_start != start) { | 532 | if (found_start != start) { |
536 | if (printk_ratelimit()) { | 533 | printk_ratelimited(KERN_INFO "btrfs bad tree block start " |
537 | printk(KERN_INFO "btrfs bad tree block start " | ||
538 | "%llu %llu\n", | 534 | "%llu %llu\n", |
539 | (unsigned long long)found_start, | 535 | (unsigned long long)found_start, |
540 | (unsigned long long)eb->start); | 536 | (unsigned long long)eb->start); |
541 | } | ||
542 | ret = -EIO; | 537 | ret = -EIO; |
543 | goto err; | 538 | goto err; |
544 | } | 539 | } |
@@ -550,10 +545,8 @@ static int btree_readpage_end_io_hook(struct page *page, u64 start, u64 end, | |||
550 | goto err; | 545 | goto err; |
551 | } | 546 | } |
552 | if (check_tree_block_fsid(root, eb)) { | 547 | if (check_tree_block_fsid(root, eb)) { |
553 | if (printk_ratelimit()) { | 548 | printk_ratelimited(KERN_INFO "btrfs bad fsid on block %llu\n", |
554 | printk(KERN_INFO "btrfs bad fsid on block %llu\n", | ||
555 | (unsigned long long)eb->start); | 549 | (unsigned long long)eb->start); |
556 | } | ||
557 | ret = -EIO; | 550 | ret = -EIO; |
558 | goto err; | 551 | goto err; |
559 | } | 552 | } |
@@ -2108,11 +2101,9 @@ static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate) | |||
2108 | if (uptodate) { | 2101 | if (uptodate) { |
2109 | set_buffer_uptodate(bh); | 2102 | set_buffer_uptodate(bh); |
2110 | } else { | 2103 | } else { |
2111 | if (printk_ratelimit()) { | 2104 | printk_ratelimited(KERN_WARNING "lost page write due to " |
2112 | printk(KERN_WARNING "lost page write due to " | ||
2113 | "I/O error on %s\n", | 2105 | "I/O error on %s\n", |
2114 | bdevname(bh->b_bdev, b)); | 2106 | bdevname(bh->b_bdev, b)); |
2115 | } | ||
2116 | /* note, we dont' set_buffer_write_io_error because we have | 2107 | /* note, we dont' set_buffer_write_io_error because we have |
2117 | * our own ways of dealing with the IO errors | 2108 | * our own ways of dealing with the IO errors |
2118 | */ | 2109 | */ |