Skip to content

Commit

Permalink
btrfs: update message levels during failed mount
Browse files Browse the repository at this point in the history
All error conditions from open_ctree shall be ERR. Warning would
suggest that something's wrong and we can continue.

Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
kdave authored and masoncl committed Jan 22, 2015
1 parent 68b663d commit aa8ee31
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2533,7 +2533,7 @@ int open_ctree(struct super_block *sb,
*/
if ((features & BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS) &&
(sectorsize != nodesize)) {
printk(KERN_WARNING "BTRFS: unequal leaf/node/sector sizes "
printk(KERN_ERR "BTRFS: unequal leaf/node/sector sizes "
"are not allowed for mixed block groups on %s\n",
sb->s_id);
goto fail_alloc;
Expand Down Expand Up @@ -2641,12 +2641,12 @@ int open_ctree(struct super_block *sb,
sb->s_blocksize_bits = blksize_bits(sectorsize);

if (btrfs_super_magic(disk_super) != BTRFS_MAGIC) {
printk(KERN_INFO "BTRFS: valid FS not found on %s\n", sb->s_id);
printk(KERN_ERR "BTRFS: valid FS not found on %s\n", sb->s_id);
goto fail_sb_buffer;
}

if (sectorsize != PAGE_SIZE) {
printk(KERN_WARNING "BTRFS: Incompatible sector size(%lu) "
printk(KERN_ERR "BTRFS: incompatible sector size (%lu) "
"found on %s\n", (unsigned long)sectorsize, sb->s_id);
goto fail_sb_buffer;
}
Expand All @@ -2655,7 +2655,7 @@ int open_ctree(struct super_block *sb,
ret = btrfs_read_sys_array(tree_root);
mutex_unlock(&fs_info->chunk_mutex);
if (ret) {
printk(KERN_WARNING "BTRFS: failed to read the system "
printk(KERN_ERR "BTRFS: failed to read the system "
"array on %s\n", sb->s_id);
goto fail_sb_buffer;
}
Expand All @@ -2670,7 +2670,7 @@ int open_ctree(struct super_block *sb,
generation);
if (!chunk_root->node ||
!test_bit(EXTENT_BUFFER_UPTODATE, &chunk_root->node->bflags)) {
printk(KERN_WARNING "BTRFS: failed to read chunk root on %s\n",
printk(KERN_ERR "BTRFS: failed to read chunk root on %s\n",
sb->s_id);
goto fail_tree_roots;
}
Expand All @@ -2682,7 +2682,7 @@ int open_ctree(struct super_block *sb,

ret = btrfs_read_chunk_tree(chunk_root);
if (ret) {
printk(KERN_WARNING "BTRFS: failed to read chunk tree on %s\n",
printk(KERN_ERR "BTRFS: failed to read chunk tree on %s\n",
sb->s_id);
goto fail_tree_roots;
}
Expand All @@ -2694,7 +2694,7 @@ int open_ctree(struct super_block *sb,
btrfs_close_extra_devices(fs_info, fs_devices, 0);

if (!fs_devices->latest_bdev) {
printk(KERN_CRIT "BTRFS: failed to read devices on %s\n",
printk(KERN_ERR "BTRFS: failed to read devices on %s\n",
sb->s_id);
goto fail_tree_roots;
}
Expand Down Expand Up @@ -2778,7 +2778,7 @@ int open_ctree(struct super_block *sb,

ret = btrfs_recover_balance(fs_info);
if (ret) {
printk(KERN_WARNING "BTRFS: failed to recover balance\n");
printk(KERN_ERR "BTRFS: failed to recover balance\n");
goto fail_block_groups;
}

Expand Down

0 comments on commit aa8ee31

Please sign in to comment.