aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorFrank Holton <fholton@gmail.com>2013-12-20 11:37:06 -0500
committerChris Mason <clm@fb.com>2014-01-28 16:20:05 -0500
commitefe120a067c8674a8ae21b194f0e68f098b61ee2 (patch)
tree1edb3b59b689a96ec15b548387c048ee959fb6fd /fs/btrfs/disk-io.c
parent5de865eebb8330eee19c37b31fb6f315a09d4273 (diff)
Btrfs: convert printk to btrfs_ and fix BTRFS prefix
Convert all applicable cases of printk and pr_* to the btrfs_* macros. Fix all uses of the BTRFS prefix. Signed-off-by: Frank Holton <fholton@gmail.com> Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c106
1 files changed, 54 insertions, 52 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 4a1871cf797b..0400a26fc8c5 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -300,11 +300,11 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf,
300 memcpy(&found, result, csum_size); 300 memcpy(&found, result, csum_size);
301 301
302 read_extent_buffer(buf, &val, 0, csum_size); 302 read_extent_buffer(buf, &val, 0, csum_size);
303 printk_ratelimited(KERN_INFO "btrfs: %s checksum verify " 303 printk_ratelimited(KERN_INFO
304 "failed on %llu wanted %X found %X " 304 "BTRFS: %s checksum verify failed on %llu wanted %X found %X "
305 "level %d\n", 305 "level %d\n",
306 root->fs_info->sb->s_id, buf->start, 306 root->fs_info->sb->s_id, buf->start,
307 val, found, btrfs_header_level(buf)); 307 val, found, btrfs_header_level(buf));
308 if (result != (char *)&inline_result) 308 if (result != (char *)&inline_result)
309 kfree(result); 309 kfree(result);
310 return 1; 310 return 1;
@@ -383,13 +383,14 @@ static int btrfs_check_super_csum(char *raw_disk_sb)
383 ret = 1; 383 ret = 1;
384 384
385 if (ret && btrfs_super_generation(disk_sb) < 10) { 385 if (ret && btrfs_super_generation(disk_sb) < 10) {
386 printk(KERN_WARNING "btrfs: super block crcs don't match, older mkfs detected\n"); 386 printk(KERN_WARNING
387 "BTRFS: super block crcs don't match, older mkfs detected\n");
387 ret = 0; 388 ret = 0;
388 } 389 }
389 } 390 }
390 391
391 if (csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) { 392 if (csum_type >= ARRAY_SIZE(btrfs_csum_sizes)) {
392 printk(KERN_ERR "btrfs: unsupported checksum algorithm %u\n", 393 printk(KERN_ERR "BTRFS: unsupported checksum algorithm %u\n",
393 csum_type); 394 csum_type);
394 ret = 1; 395 ret = 1;
395 } 396 }
@@ -498,8 +499,8 @@ static int check_tree_block_fsid(struct btrfs_root *root,
498} 499}
499 500
500#define CORRUPT(reason, eb, root, slot) \ 501#define CORRUPT(reason, eb, root, slot) \
501 printk(KERN_CRIT "btrfs: corrupt leaf, %s: block=%llu," \ 502 btrfs_crit(root->fs_info, "corrupt leaf, %s: block=%llu," \
502 "root=%llu, slot=%d\n", reason, \ 503 "root=%llu, slot=%d", reason, \
503 btrfs_header_bytenr(eb), root->objectid, slot) 504 btrfs_header_bytenr(eb), root->objectid, slot)
504 505
505static noinline int check_leaf(struct btrfs_root *root, 506static noinline int check_leaf(struct btrfs_root *root,
@@ -596,21 +597,21 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
596 597
597 found_start = btrfs_header_bytenr(eb); 598 found_start = btrfs_header_bytenr(eb);
598 if (found_start != eb->start) { 599 if (found_start != eb->start) {
599 printk_ratelimited(KERN_INFO "btrfs bad tree block start " 600 printk_ratelimited(KERN_INFO "BTRFS: bad tree block start "
600 "%llu %llu\n", 601 "%llu %llu\n",
601 found_start, eb->start); 602 found_start, eb->start);
602 ret = -EIO; 603 ret = -EIO;
603 goto err; 604 goto err;
604 } 605 }
605 if (check_tree_block_fsid(root, eb)) { 606 if (check_tree_block_fsid(root, eb)) {
606 printk_ratelimited(KERN_INFO "btrfs bad fsid on block %llu\n", 607 printk_ratelimited(KERN_INFO "BTRFS: bad fsid on block %llu\n",
607 eb->start); 608 eb->start);
608 ret = -EIO; 609 ret = -EIO;
609 goto err; 610 goto err;
610 } 611 }
611 found_level = btrfs_header_level(eb); 612 found_level = btrfs_header_level(eb);
612 if (found_level >= BTRFS_MAX_LEVEL) { 613 if (found_level >= BTRFS_MAX_LEVEL) {
613 btrfs_info(root->fs_info, "bad tree block level %d\n", 614 btrfs_info(root->fs_info, "bad tree block level %d",
614 (int)btrfs_header_level(eb)); 615 (int)btrfs_header_level(eb));
615 ret = -EIO; 616 ret = -EIO;
616 goto err; 617 goto err;
@@ -1004,8 +1005,9 @@ static void btree_invalidatepage(struct page *page, unsigned int offset,
1004 extent_invalidatepage(tree, page, offset); 1005 extent_invalidatepage(tree, page, offset);
1005 btree_releasepage(page, GFP_NOFS); 1006 btree_releasepage(page, GFP_NOFS);
1006 if (PagePrivate(page)) { 1007 if (PagePrivate(page)) {
1007 printk(KERN_WARNING "btrfs warning page private not zero " 1008 btrfs_warn(BTRFS_I(page->mapping->host)->root->fs_info,
1008 "on page %llu\n", (unsigned long long)page_offset(page)); 1009 "page private not zero on page %llu",
1010 (unsigned long long)page_offset(page));
1009 ClearPagePrivate(page); 1011 ClearPagePrivate(page);
1010 set_page_private(page, 0); 1012 set_page_private(page, 0);
1011 page_cache_release(page); 1013 page_cache_release(page);
@@ -2322,7 +2324,7 @@ int open_ctree(struct super_block *sb,
2322 * Pass the whole disk block of size BTRFS_SUPER_INFO_SIZE (4k). 2324 * Pass the whole disk block of size BTRFS_SUPER_INFO_SIZE (4k).
2323 */ 2325 */
2324 if (btrfs_check_super_csum(bh->b_data)) { 2326 if (btrfs_check_super_csum(bh->b_data)) {
2325 printk(KERN_ERR "btrfs: superblock checksum mismatch\n"); 2327 printk(KERN_ERR "BTRFS: superblock checksum mismatch\n");
2326 err = -EINVAL; 2328 err = -EINVAL;
2327 goto fail_alloc; 2329 goto fail_alloc;
2328 } 2330 }
@@ -2341,7 +2343,7 @@ int open_ctree(struct super_block *sb,
2341 2343
2342 ret = btrfs_check_super_valid(fs_info, sb->s_flags & MS_RDONLY); 2344 ret = btrfs_check_super_valid(fs_info, sb->s_flags & MS_RDONLY);
2343 if (ret) { 2345 if (ret) {
2344 printk(KERN_ERR "btrfs: superblock contains fatal errors\n"); 2346 printk(KERN_ERR "BTRFS: superblock contains fatal errors\n");
2345 err = -EINVAL; 2347 err = -EINVAL;
2346 goto fail_alloc; 2348 goto fail_alloc;
2347 } 2349 }
@@ -2406,7 +2408,7 @@ int open_ctree(struct super_block *sb,
2406 features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO; 2408 features |= BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO;
2407 2409
2408 if (features & BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA) 2410 if (features & BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA)
2409 printk(KERN_ERR "btrfs: has skinny extents\n"); 2411 printk(KERN_ERR "BTRFS: has skinny extents\n");
2410 2412
2411 /* 2413 /*
2412 * flag our filesystem as having big metadata blocks if 2414 * flag our filesystem as having big metadata blocks if
@@ -2414,7 +2416,7 @@ int open_ctree(struct super_block *sb,
2414 */ 2416 */
2415 if (btrfs_super_leafsize(disk_super) > PAGE_CACHE_SIZE) { 2417 if (btrfs_super_leafsize(disk_super) > PAGE_CACHE_SIZE) {
2416 if (!(features & BTRFS_FEATURE_INCOMPAT_BIG_METADATA)) 2418 if (!(features & BTRFS_FEATURE_INCOMPAT_BIG_METADATA))
2417 printk(KERN_INFO "btrfs flagging fs with big metadata feature\n"); 2419 printk(KERN_INFO "BTRFS: flagging fs with big metadata feature\n");
2418 features |= BTRFS_FEATURE_INCOMPAT_BIG_METADATA; 2420 features |= BTRFS_FEATURE_INCOMPAT_BIG_METADATA;
2419 } 2421 }
2420 2422
@@ -2431,7 +2433,7 @@ int open_ctree(struct super_block *sb,
2431 */ 2433 */
2432 if ((features & BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS) && 2434 if ((features & BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS) &&
2433 (sectorsize != leafsize)) { 2435 (sectorsize != leafsize)) {
2434 printk(KERN_WARNING "btrfs: unequal leaf/node/sector sizes " 2436 printk(KERN_WARNING "BTRFS: unequal leaf/node/sector sizes "
2435 "are not allowed for mixed block groups on %s\n", 2437 "are not allowed for mixed block groups on %s\n",
2436 sb->s_id); 2438 sb->s_id);
2437 goto fail_alloc; 2439 goto fail_alloc;
@@ -2568,12 +2570,12 @@ int open_ctree(struct super_block *sb,
2568 sb->s_blocksize_bits = blksize_bits(sectorsize); 2570 sb->s_blocksize_bits = blksize_bits(sectorsize);
2569 2571
2570 if (btrfs_super_magic(disk_super) != BTRFS_MAGIC) { 2572 if (btrfs_super_magic(disk_super) != BTRFS_MAGIC) {
2571 printk(KERN_INFO "btrfs: valid FS not found on %s\n", sb->s_id); 2573 printk(KERN_INFO "BTRFS: valid FS not found on %s\n", sb->s_id);
2572 goto fail_sb_buffer; 2574 goto fail_sb_buffer;
2573 } 2575 }
2574 2576
2575 if (sectorsize != PAGE_SIZE) { 2577 if (sectorsize != PAGE_SIZE) {
2576 printk(KERN_WARNING "btrfs: Incompatible sector size(%lu) " 2578 printk(KERN_WARNING "BTRFS: Incompatible sector size(%lu) "
2577 "found on %s\n", (unsigned long)sectorsize, sb->s_id); 2579 "found on %s\n", (unsigned long)sectorsize, sb->s_id);
2578 goto fail_sb_buffer; 2580 goto fail_sb_buffer;
2579 } 2581 }
@@ -2582,7 +2584,7 @@ int open_ctree(struct super_block *sb,
2582 ret = btrfs_read_sys_array(tree_root); 2584 ret = btrfs_read_sys_array(tree_root);
2583 mutex_unlock(&fs_info->chunk_mutex); 2585 mutex_unlock(&fs_info->chunk_mutex);
2584 if (ret) { 2586 if (ret) {
2585 printk(KERN_WARNING "btrfs: failed to read the system " 2587 printk(KERN_WARNING "BTRFS: failed to read the system "
2586 "array on %s\n", sb->s_id); 2588 "array on %s\n", sb->s_id);
2587 goto fail_sb_buffer; 2589 goto fail_sb_buffer;
2588 } 2590 }
@@ -2599,7 +2601,7 @@ int open_ctree(struct super_block *sb,
2599 blocksize, generation); 2601 blocksize, generation);
2600 if (!chunk_root->node || 2602 if (!chunk_root->node ||
2601 !test_bit(EXTENT_BUFFER_UPTODATE, &chunk_root->node->bflags)) { 2603 !test_bit(EXTENT_BUFFER_UPTODATE, &chunk_root->node->bflags)) {
2602 printk(KERN_WARNING "btrfs: failed to read chunk root on %s\n", 2604 printk(KERN_WARNING "BTRFS: failed to read chunk root on %s\n",
2603 sb->s_id); 2605 sb->s_id);
2604 goto fail_tree_roots; 2606 goto fail_tree_roots;
2605 } 2607 }
@@ -2611,7 +2613,7 @@ int open_ctree(struct super_block *sb,
2611 2613
2612 ret = btrfs_read_chunk_tree(chunk_root); 2614 ret = btrfs_read_chunk_tree(chunk_root);
2613 if (ret) { 2615 if (ret) {
2614 printk(KERN_WARNING "btrfs: failed to read chunk tree on %s\n", 2616 printk(KERN_WARNING "BTRFS: failed to read chunk tree on %s\n",
2615 sb->s_id); 2617 sb->s_id);
2616 goto fail_tree_roots; 2618 goto fail_tree_roots;
2617 } 2619 }
@@ -2623,7 +2625,7 @@ int open_ctree(struct super_block *sb,
2623 btrfs_close_extra_devices(fs_info, fs_devices, 0); 2625 btrfs_close_extra_devices(fs_info, fs_devices, 0);
2624 2626
2625 if (!fs_devices->latest_bdev) { 2627 if (!fs_devices->latest_bdev) {
2626 printk(KERN_CRIT "btrfs: failed to read devices on %s\n", 2628 printk(KERN_CRIT "BTRFS: failed to read devices on %s\n",
2627 sb->s_id); 2629 sb->s_id);
2628 goto fail_tree_roots; 2630 goto fail_tree_roots;
2629 } 2631 }
@@ -2638,7 +2640,7 @@ retry_root_backup:
2638 blocksize, generation); 2640 blocksize, generation);
2639 if (!tree_root->node || 2641 if (!tree_root->node ||
2640 !test_bit(EXTENT_BUFFER_UPTODATE, &tree_root->node->bflags)) { 2642 !test_bit(EXTENT_BUFFER_UPTODATE, &tree_root->node->bflags)) {
2641 printk(KERN_WARNING "btrfs: failed to read tree root on %s\n", 2643 printk(KERN_WARNING "BTRFS: failed to read tree root on %s\n",
2642 sb->s_id); 2644 sb->s_id);
2643 2645
2644 goto recovery_tree_root; 2646 goto recovery_tree_root;
@@ -2709,20 +2711,20 @@ retry_root_backup:
2709 2711
2710 ret = btrfs_recover_balance(fs_info); 2712 ret = btrfs_recover_balance(fs_info);
2711 if (ret) { 2713 if (ret) {
2712 printk(KERN_WARNING "btrfs: failed to recover balance\n"); 2714 printk(KERN_WARNING "BTRFS: failed to recover balance\n");
2713 goto fail_block_groups; 2715 goto fail_block_groups;
2714 } 2716 }
2715 2717
2716 ret = btrfs_init_dev_stats(fs_info); 2718 ret = btrfs_init_dev_stats(fs_info);
2717 if (ret) { 2719 if (ret) {
2718 printk(KERN_ERR "btrfs: failed to init dev_stats: %d\n", 2720 printk(KERN_ERR "BTRFS: failed to init dev_stats: %d\n",
2719 ret); 2721 ret);
2720 goto fail_block_groups; 2722 goto fail_block_groups;
2721 } 2723 }
2722 2724
2723 ret = btrfs_init_dev_replace(fs_info); 2725 ret = btrfs_init_dev_replace(fs_info);
2724 if (ret) { 2726 if (ret) {
2725 pr_err("btrfs: failed to init dev_replace: %d\n", ret); 2727 pr_err("BTRFS: failed to init dev_replace: %d\n", ret);
2726 goto fail_block_groups; 2728 goto fail_block_groups;
2727 } 2729 }
2728 2730
@@ -2730,19 +2732,19 @@ retry_root_backup:
2730 2732
2731 ret = btrfs_sysfs_add_one(fs_info); 2733 ret = btrfs_sysfs_add_one(fs_info);
2732 if (ret) { 2734 if (ret) {
2733 pr_err("btrfs: failed to init sysfs interface: %d\n", ret); 2735 pr_err("BTRFS: failed to init sysfs interface: %d\n", ret);
2734 goto fail_block_groups; 2736 goto fail_block_groups;
2735 } 2737 }
2736 2738
2737 ret = btrfs_init_space_info(fs_info); 2739 ret = btrfs_init_space_info(fs_info);
2738 if (ret) { 2740 if (ret) {
2739 printk(KERN_ERR "Failed to initial space info: %d\n", ret); 2741 printk(KERN_ERR "BTRFS: Failed to initial space info: %d\n", ret);
2740 goto fail_block_groups; 2742 goto fail_block_groups;
2741 } 2743 }
2742 2744
2743 ret = btrfs_read_block_groups(extent_root); 2745 ret = btrfs_read_block_groups(extent_root);
2744 if (ret) { 2746 if (ret) {
2745 printk(KERN_ERR "Failed to read block groups: %d\n", ret); 2747 printk(KERN_ERR "BTRFS: Failed to read block groups: %d\n", ret);
2746 goto fail_block_groups; 2748 goto fail_block_groups;
2747 } 2749 }
2748 fs_info->num_tolerated_disk_barrier_failures = 2750 fs_info->num_tolerated_disk_barrier_failures =
@@ -2750,8 +2752,8 @@ retry_root_backup:
2750 if (fs_info->fs_devices->missing_devices > 2752 if (fs_info->fs_devices->missing_devices >
2751 fs_info->num_tolerated_disk_barrier_failures && 2753 fs_info->num_tolerated_disk_barrier_failures &&
2752 !(sb->s_flags & MS_RDONLY)) { 2754 !(sb->s_flags & MS_RDONLY)) {
2753 printk(KERN_WARNING 2755 printk(KERN_WARNING "BTRFS: "
2754 "Btrfs: too many missing devices, writeable mount is not allowed\n"); 2756 "too many missing devices, writeable mount is not allowed\n");
2755 goto fail_block_groups; 2757 goto fail_block_groups;
2756 } 2758 }
2757 2759
@@ -2769,7 +2771,7 @@ retry_root_backup:
2769 if (!btrfs_test_opt(tree_root, SSD) && 2771 if (!btrfs_test_opt(tree_root, SSD) &&
2770 !btrfs_test_opt(tree_root, NOSSD) && 2772 !btrfs_test_opt(tree_root, NOSSD) &&
2771 !fs_info->fs_devices->rotating) { 2773 !fs_info->fs_devices->rotating) {
2772 printk(KERN_INFO "Btrfs detected SSD devices, enabling SSD " 2774 printk(KERN_INFO "BTRFS: detected SSD devices, enabling SSD "
2773 "mode\n"); 2775 "mode\n");
2774 btrfs_set_opt(fs_info->mount_opt, SSD); 2776 btrfs_set_opt(fs_info->mount_opt, SSD);
2775 } 2777 }
@@ -2782,7 +2784,7 @@ retry_root_backup:
2782 1 : 0, 2784 1 : 0,
2783 fs_info->check_integrity_print_mask); 2785 fs_info->check_integrity_print_mask);
2784 if (ret) 2786 if (ret)
2785 printk(KERN_WARNING "btrfs: failed to initialize" 2787 printk(KERN_WARNING "BTRFS: failed to initialize"
2786 " integrity check module %s\n", sb->s_id); 2788 " integrity check module %s\n", sb->s_id);
2787 } 2789 }
2788#endif 2790#endif
@@ -2795,7 +2797,7 @@ retry_root_backup:
2795 u64 bytenr = btrfs_super_log_root(disk_super); 2797 u64 bytenr = btrfs_super_log_root(disk_super);
2796 2798
2797 if (fs_devices->rw_devices == 0) { 2799 if (fs_devices->rw_devices == 0) {
2798 printk(KERN_WARNING "Btrfs log replay required " 2800 printk(KERN_WARNING "BTRFS: log replay required "
2799 "on RO media\n"); 2801 "on RO media\n");
2800 err = -EIO; 2802 err = -EIO;
2801 goto fail_qgroup; 2803 goto fail_qgroup;
@@ -2818,7 +2820,7 @@ retry_root_backup:
2818 generation + 1); 2820 generation + 1);
2819 if (!log_tree_root->node || 2821 if (!log_tree_root->node ||
2820 !extent_buffer_uptodate(log_tree_root->node)) { 2822 !extent_buffer_uptodate(log_tree_root->node)) {
2821 printk(KERN_ERR "btrfs: failed to read log tree\n"); 2823 printk(KERN_ERR "BTRFS: failed to read log tree\n");
2822 free_extent_buffer(log_tree_root->node); 2824 free_extent_buffer(log_tree_root->node);
2823 kfree(log_tree_root); 2825 kfree(log_tree_root);
2824 goto fail_trans_kthread; 2826 goto fail_trans_kthread;
@@ -2852,7 +2854,7 @@ retry_root_backup:
2852 ret = btrfs_recover_relocation(tree_root); 2854 ret = btrfs_recover_relocation(tree_root);
2853 if (ret < 0) { 2855 if (ret < 0) {
2854 printk(KERN_WARNING 2856 printk(KERN_WARNING
2855 "btrfs: failed to recover relocation\n"); 2857 "BTRFS: failed to recover relocation\n");
2856 err = -EINVAL; 2858 err = -EINVAL;
2857 goto fail_qgroup; 2859 goto fail_qgroup;
2858 } 2860 }
@@ -2882,14 +2884,14 @@ retry_root_backup:
2882 2884
2883 ret = btrfs_resume_balance_async(fs_info); 2885 ret = btrfs_resume_balance_async(fs_info);
2884 if (ret) { 2886 if (ret) {
2885 printk(KERN_WARNING "btrfs: failed to resume balance\n"); 2887 printk(KERN_WARNING "BTRFS: failed to resume balance\n");
2886 close_ctree(tree_root); 2888 close_ctree(tree_root);
2887 return ret; 2889 return ret;
2888 } 2890 }
2889 2891
2890 ret = btrfs_resume_dev_replace_async(fs_info); 2892 ret = btrfs_resume_dev_replace_async(fs_info);
2891 if (ret) { 2893 if (ret) {
2892 pr_warn("btrfs: failed to resume dev_replace\n"); 2894 pr_warn("BTRFS: failed to resume dev_replace\n");
2893 close_ctree(tree_root); 2895 close_ctree(tree_root);
2894 return ret; 2896 return ret;
2895 } 2897 }
@@ -2897,20 +2899,20 @@ retry_root_backup:
2897 btrfs_qgroup_rescan_resume(fs_info); 2899 btrfs_qgroup_rescan_resume(fs_info);
2898 2900
2899 if (create_uuid_tree) { 2901 if (create_uuid_tree) {
2900 pr_info("btrfs: creating UUID tree\n"); 2902 pr_info("BTRFS: creating UUID tree\n");
2901 ret = btrfs_create_uuid_tree(fs_info); 2903 ret = btrfs_create_uuid_tree(fs_info);
2902 if (ret) { 2904 if (ret) {
2903 pr_warn("btrfs: failed to create the UUID tree %d\n", 2905 pr_warn("BTRFS: failed to create the UUID tree %d\n",
2904 ret); 2906 ret);
2905 close_ctree(tree_root); 2907 close_ctree(tree_root);
2906 return ret; 2908 return ret;
2907 } 2909 }
2908 } else if (check_uuid_tree || 2910 } else if (check_uuid_tree ||
2909 btrfs_test_opt(tree_root, RESCAN_UUID_TREE)) { 2911 btrfs_test_opt(tree_root, RESCAN_UUID_TREE)) {
2910 pr_info("btrfs: checking UUID tree\n"); 2912 pr_info("BTRFS: checking UUID tree\n");
2911 ret = btrfs_check_uuid_tree(fs_info); 2913 ret = btrfs_check_uuid_tree(fs_info);
2912 if (ret) { 2914 if (ret) {
2913 pr_warn("btrfs: failed to check the UUID tree %d\n", 2915 pr_warn("BTRFS: failed to check the UUID tree %d\n",
2914 ret); 2916 ret);
2915 close_ctree(tree_root); 2917 close_ctree(tree_root);
2916 return ret; 2918 return ret;
@@ -2991,7 +2993,7 @@ static void btrfs_end_buffer_write_sync(struct buffer_head *bh, int uptodate)
2991 struct btrfs_device *device = (struct btrfs_device *) 2993 struct btrfs_device *device = (struct btrfs_device *)
2992 bh->b_private; 2994 bh->b_private;
2993 2995
2994 printk_ratelimited_in_rcu(KERN_WARNING "lost page write due to " 2996 printk_ratelimited_in_rcu(KERN_WARNING "BTRFS: lost page write due to "
2995 "I/O error on %s\n", 2997 "I/O error on %s\n",
2996 rcu_str_deref(device->name)); 2998 rcu_str_deref(device->name));
2997 /* note, we dont' set_buffer_write_io_error because we have 2999 /* note, we dont' set_buffer_write_io_error because we have
@@ -3110,7 +3112,7 @@ static int write_dev_supers(struct btrfs_device *device,
3110 bh = __getblk(device->bdev, bytenr / 4096, 3112 bh = __getblk(device->bdev, bytenr / 4096,
3111 BTRFS_SUPER_INFO_SIZE); 3113 BTRFS_SUPER_INFO_SIZE);
3112 if (!bh) { 3114 if (!bh) {
3113 printk(KERN_ERR "btrfs: couldn't get super " 3115 printk(KERN_ERR "BTRFS: couldn't get super "
3114 "buffer head for bytenr %Lu\n", bytenr); 3116 "buffer head for bytenr %Lu\n", bytenr);
3115 errors++; 3117 errors++;
3116 continue; 3118 continue;
@@ -3177,7 +3179,7 @@ static int write_dev_flush(struct btrfs_device *device, int wait)
3177 wait_for_completion(&device->flush_wait); 3179 wait_for_completion(&device->flush_wait);
3178 3180
3179 if (bio_flagged(bio, BIO_EOPNOTSUPP)) { 3181 if (bio_flagged(bio, BIO_EOPNOTSUPP)) {
3180 printk_in_rcu("btrfs: disabling barriers on dev %s\n", 3182 printk_in_rcu("BTRFS: disabling barriers on dev %s\n",
3181 rcu_str_deref(device->name)); 3183 rcu_str_deref(device->name));
3182 device->nobarriers = 1; 3184 device->nobarriers = 1;
3183 } else if (!bio_flagged(bio, BIO_UPTODATE)) { 3185 } else if (!bio_flagged(bio, BIO_UPTODATE)) {
@@ -3398,7 +3400,7 @@ static int write_all_supers(struct btrfs_root *root, int max_mirrors)
3398 total_errors++; 3400 total_errors++;
3399 } 3401 }
3400 if (total_errors > max_errors) { 3402 if (total_errors > max_errors) {
3401 printk(KERN_ERR "btrfs: %d errors while writing supers\n", 3403 btrfs_err(root->fs_info, "%d errors while writing supers",
3402 total_errors); 3404 total_errors);
3403 mutex_unlock(&root->fs_info->fs_devices->device_list_mutex); 3405 mutex_unlock(&root->fs_info->fs_devices->device_list_mutex);
3404 3406
@@ -3554,7 +3556,7 @@ int close_ctree(struct btrfs_root *root)
3554 if (!(fs_info->sb->s_flags & MS_RDONLY)) { 3556 if (!(fs_info->sb->s_flags & MS_RDONLY)) {
3555 ret = btrfs_commit_super(root); 3557 ret = btrfs_commit_super(root);
3556 if (ret) 3558 if (ret)
3557 printk(KERN_ERR "btrfs: commit super ret %d\n", ret); 3559 btrfs_err(root->fs_info, "commit super ret %d", ret);
3558 } 3560 }
3559 3561
3560 if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) 3562 if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state))
@@ -3571,7 +3573,7 @@ int close_ctree(struct btrfs_root *root)
3571 btrfs_free_qgroup_config(root->fs_info); 3573 btrfs_free_qgroup_config(root->fs_info);
3572 3574
3573 if (percpu_counter_sum(&fs_info->delalloc_bytes)) { 3575 if (percpu_counter_sum(&fs_info->delalloc_bytes)) {
3574 printk(KERN_INFO "btrfs: at unmount delalloc count %lld\n", 3576 btrfs_info(root->fs_info, "at unmount delalloc count %lld",
3575 percpu_counter_sum(&fs_info->delalloc_bytes)); 3577 percpu_counter_sum(&fs_info->delalloc_bytes));
3576 } 3578 }
3577 3579
@@ -3798,7 +3800,7 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
3798 spin_lock(&delayed_refs->lock); 3800 spin_lock(&delayed_refs->lock);
3799 if (delayed_refs->num_entries == 0) { 3801 if (delayed_refs->num_entries == 0) {
3800 spin_unlock(&delayed_refs->lock); 3802 spin_unlock(&delayed_refs->lock);
3801 printk(KERN_INFO "delayed_refs has NO entry\n"); 3803 btrfs_info(root->fs_info, "delayed_refs has NO entry");
3802 return ret; 3804 return ret;
3803 } 3805 }
3804 3806