diff options
author | Chris Mason <clm@fb.com> | 2015-10-12 19:22:26 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-12 19:22:26 -0400 |
commit | 640926ffdda7e817965d3bfb5bbbc51598ccf49b (patch) | |
tree | 0fd21a965af94c7586f8e9f692c4676cf1d35ffc /fs/btrfs/disk-io.c | |
parent | 25cb62b76430a91cc6195f902e61c2cb84ade622 (diff) | |
parent | f14d104dbdb5044dac9acd0e983ffb60f706c746 (diff) |
Merge branch 'cleanup/messages' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.4
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 1e60d00d4ea7..75f84e4c2033 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -319,9 +319,9 @@ static int csum_tree_block(struct btrfs_fs_info *fs_info, | |||
319 | memcpy(&found, result, csum_size); | 319 | memcpy(&found, result, csum_size); |
320 | 320 | ||
321 | read_extent_buffer(buf, &val, 0, csum_size); | 321 | read_extent_buffer(buf, &val, 0, csum_size); |
322 | printk_ratelimited(KERN_WARNING | 322 | btrfs_warn_rl(fs_info, |
323 | "BTRFS: %s checksum verify failed on %llu wanted %X found %X " | 323 | "%s checksum verify failed on %llu wanted %X found %X " |
324 | "level %d\n", | 324 | "level %d", |
325 | fs_info->sb->s_id, buf->start, | 325 | fs_info->sb->s_id, buf->start, |
326 | val, found, btrfs_header_level(buf)); | 326 | val, found, btrfs_header_level(buf)); |
327 | if (result != (char *)&inline_result) | 327 | if (result != (char *)&inline_result) |
@@ -368,9 +368,9 @@ static int verify_parent_transid(struct extent_io_tree *io_tree, | |||
368 | ret = 0; | 368 | ret = 0; |
369 | goto out; | 369 | goto out; |
370 | } | 370 | } |
371 | printk_ratelimited(KERN_ERR | 371 | btrfs_err_rl(eb->fs_info, |
372 | "BTRFS (device %s): parent transid verify failed on %llu wanted %llu found %llu\n", | 372 | "parent transid verify failed on %llu wanted %llu found %llu", |
373 | eb->fs_info->sb->s_id, eb->start, | 373 | eb->start, |
374 | parent_transid, btrfs_header_generation(eb)); | 374 | parent_transid, btrfs_header_generation(eb)); |
375 | ret = 1; | 375 | ret = 1; |
376 | 376 | ||
@@ -629,15 +629,14 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio, | |||
629 | 629 | ||
630 | found_start = btrfs_header_bytenr(eb); | 630 | found_start = btrfs_header_bytenr(eb); |
631 | if (found_start != eb->start) { | 631 | if (found_start != eb->start) { |
632 | printk_ratelimited(KERN_ERR "BTRFS (device %s): bad tree block start " | 632 | btrfs_err_rl(eb->fs_info, "bad tree block start %llu %llu", |
633 | "%llu %llu\n", | 633 | found_start, eb->start); |
634 | eb->fs_info->sb->s_id, found_start, eb->start); | ||
635 | ret = -EIO; | 634 | ret = -EIO; |
636 | goto err; | 635 | goto err; |
637 | } | 636 | } |
638 | if (check_tree_block_fsid(root->fs_info, eb)) { | 637 | if (check_tree_block_fsid(root->fs_info, eb)) { |
639 | printk_ratelimited(KERN_ERR "BTRFS (device %s): bad fsid on block %llu\n", | 638 | btrfs_err_rl(eb->fs_info, "bad fsid on block %llu", |
640 | eb->fs_info->sb->s_id, eb->start); | 639 | eb->start); |
641 | ret = -EIO; | 640 | ret = -EIO; |
642 | goto err; | 641 | goto err; |
643 | } | 642 | } |
@@ -2348,8 +2347,7 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info, | |||
2348 | u64 bytenr = btrfs_super_log_root(disk_super); | 2347 | u64 bytenr = btrfs_super_log_root(disk_super); |
2349 | 2348 | ||
2350 | if (fs_devices->rw_devices == 0) { | 2349 | if (fs_devices->rw_devices == 0) { |
2351 | printk(KERN_WARNING "BTRFS: log replay required " | 2350 | btrfs_warn(fs_info, "log replay required on RO media"); |
2352 | "on RO media\n"); | ||
2353 | return -EIO; | 2351 | return -EIO; |
2354 | } | 2352 | } |
2355 | 2353 | ||
@@ -2364,12 +2362,12 @@ static int btrfs_replay_log(struct btrfs_fs_info *fs_info, | |||
2364 | log_tree_root->node = read_tree_block(tree_root, bytenr, | 2362 | log_tree_root->node = read_tree_block(tree_root, bytenr, |
2365 | fs_info->generation + 1); | 2363 | fs_info->generation + 1); |
2366 | if (IS_ERR(log_tree_root->node)) { | 2364 | if (IS_ERR(log_tree_root->node)) { |
2367 | printk(KERN_ERR "BTRFS: failed to read log tree\n"); | 2365 | btrfs_warn(fs_info, "failed to read log tree"); |
2368 | ret = PTR_ERR(log_tree_root->node); | 2366 | ret = PTR_ERR(log_tree_root->node); |
2369 | kfree(log_tree_root); | 2367 | kfree(log_tree_root); |
2370 | return ret; | 2368 | return ret; |
2371 | } else if (!extent_buffer_uptodate(log_tree_root->node)) { | 2369 | } else if (!extent_buffer_uptodate(log_tree_root->node)) { |
2372 | printk(KERN_ERR "BTRFS: failed to read log tree\n"); | 2370 | btrfs_err(fs_info, "failed to read log tree"); |
2373 | free_extent_buffer(log_tree_root->node); | 2371 | free_extent_buffer(log_tree_root->node); |
2374 | kfree(log_tree_root); | 2372 | kfree(log_tree_root); |
2375 | return -EIO; | 2373 | return -EIO; |
@@ -3179,8 +3177,8 @@ static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate) | |||
3179 | struct btrfs_device *device = (struct btrfs_device *) | 3177 | struct btrfs_device *device = (struct btrfs_device *) |
3180 | bh->b_private; | 3178 | bh->b_private; |
3181 | 3179 | ||
3182 | printk_ratelimited_in_rcu(KERN_WARNING "BTRFS: lost page write due to " | 3180 | btrfs_warn_rl_in_rcu(device->dev_root->fs_info, |
3183 | "I/O error on %s\n", | 3181 | "lost page write due to IO error on %s", |
3184 | rcu_str_deref(device->name)); | 3182 | rcu_str_deref(device->name)); |
3185 | /* note, we dont' set_buffer_write_io_error because we have | 3183 | /* note, we dont' set_buffer_write_io_error because we have |
3186 | * our own ways of dealing with the IO errors | 3184 | * our own ways of dealing with the IO errors |
@@ -3299,8 +3297,9 @@ static int write_dev_supers(struct btrfs_device *device, | |||
3299 | bh = __getblk(device->bdev, bytenr / 4096, | 3297 | bh = __getblk(device->bdev, bytenr / 4096, |
3300 | BTRFS_SUPER_INFO_SIZE); | 3298 | BTRFS_SUPER_INFO_SIZE); |
3301 | if (!bh) { | 3299 | if (!bh) { |
3302 | printk(KERN_ERR "BTRFS: couldn't get super " | 3300 | btrfs_err(device->dev_root->fs_info, |
3303 | "buffer head for bytenr %Lu\n", bytenr); | 3301 | "couldn't get super buffer head for bytenr %llu", |
3302 | bytenr); | ||
3304 | errors++; | 3303 | errors++; |
3305 | continue; | 3304 | continue; |
3306 | } | 3305 | } |