Updates in message levels
This is motivated by the ERR level when skinny metadata are used, this has been reported several times. Patch tagged for stable. The rest is taken from a SLES patch that I forgot to forward upstream.
You can pull the branch from
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git fix/message-levels
based on current master (d790be3863b28fd22e0)
David Sterba (4):
btrfs: update message levels for errors
btrfs: update message levels during failed mount
btrfs: update message levels after checksum errors
btrfs: set proper message level for skinny metadata
fs/btrfs/disk-io.c | 29 +++++++++++++++-------------- fs/btrfs/inode.c | 4 ++-- 2 files changed, 17 insertions(+), 16 deletions(-)
Signature · 1 line
2.1.3
PATCH 1/4 btrfs: update message levels for errors
Several messages that point to some internal problem, level INFO is wrong here.
--- fs/btrfs/disk-io.c | 9 +++++---- fs/btrfs/inode.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)
fs/btrfs/disk-io.c +5 -4
@@ -367,7 +367,8 @@ static int verify_parent_transid(struct extent_io_tree *io_tree, ret =0 ; goto out; } -printk_ratelimited (KERN_INFO "BTRFS (device %s): parent transid verify failed on %llu wanted %llu found %llu\n" , +printk_ratelimited (KERN_ERR +"BTRFS (device %s): parent transid verify failed on %llu wanted %llu found %llu\n" , eb->fs_info->sb->s_id, eb->start, parent_transid,btrfs_header_generation (eb)); ret =1 ;
@@ -633,21 +634,21 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio, found_start =btrfs_header_bytenr (eb);if (found_start != eb->start) { -printk_ratelimited (KERN_INFO "BTRFS (device %s): bad tree block start " +printk_ratelimited (KERN_ERR "BTRFS (device %s): bad tree block start " "%llu %llu\n" , eb->fs_info->sb->s_id, found_start, eb->start); ret = -EIO ; goto err; }if (check_tree_block_fsid (root, eb)) { -printk_ratelimited (KERN_INFO "BTRFS (device %s): bad fsid on block %llu\n" , +printk_ratelimited (KERN_ERR "BTRFS (device %s): bad fsid on block %llu\n" , eb->fs_info->sb->s_id, eb->start); ret = -EIO ; goto err; } found_level =btrfs_header_level (eb);if (found_level >=BTRFS_MAX_LEVEL ) { -btrfs_info (root->fs_info,"bad tree block level %d" , +btrfs_err (root->fs_info,"bad tree block level %d" , (int )btrfs_header_level (eb)); ret = -EIO ; goto err;
fs/btrfs/inode.c +1 -1
@@ -3407,7 +3407,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) out:if (ret) -btrfs_crit (root->fs_info, +btrfs_err (root->fs_info,"could not do orphan cleanup %d" , ret);btrfs_free_path (path);return ret;
Signature · 1 line
2.1.3
PATCH 2/4 btrfs: update message levels during failed mount
In reply to David SterbaAll error conditions from open_ctree shall be ERR. Warning would suggest that something's wrong and we can continue.
--- fs/btrfs/disk-io.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
fs/btrfs/disk-io.c +8 -8
@@ -2523,7 +2523,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;
@@ -2631,12 +2631,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; }
@@ -2645,7 +2645,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; }
@@ -2660,7 +2660,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; }
@@ -2672,7 +2672,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; }
@@ -2684,7 +2684,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; }
@@ -2768,7 +2768,7 @@ retry_root_backup: 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; }
Signature · 1 line
2.1.3
PATCH 3/4 btrfs: update message levels after checksum errors
In reply to David SterbaThe errors are worth noting and might get missed with INFO level.
--- fs/btrfs/disk-io.c | 2 +- fs/btrfs/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +1 -1
@@ -318,7 +318,7 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf,memcpy (&found, result, csum_size);read_extent_buffer (buf, &val,0 , csum_size); - printk_ratelimited(KERN_INFO + printk_ratelimited(KERN_WARNING "BTRFS: %s checksum verify failed on %llu wanted %X found %X " "level %d\n", root->fs_info->sb->s_id, buf->start,
fs/btrfs/inode.c +1 -1
@@ -2945,7 +2945,7 @@ static int __readpage_endio_check(struct inode *inode,return 0 ; zeroit:if (__ratelimit (&_rs)) -btrfs_info (BTRFS_I (inode)->root->fs_info, +btrfs_warn (BTRFS_I (inode)->root->fs_info,"csum failed ino %llu off %llu csum %u expected csum %u" ,btrfs_ino (inode), start, csum, csum_expected);memset (kaddr + pgoff,1 , len);
Signature · 1 line
2.1.3
PATCH 4/4 btrfs: set proper message level for skinny metadata
In reply to David SterbaThis has been confusing people for too long, the message is really just informative.
--- fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/disk-io.c +1 -1
@@ -2499,7 +2499,7 @@ int open_ctree(struct super_block *sb, features |=BTRFS_FEATURE_INCOMPAT_COMPRESS_LZO ;if (features &BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA ) -printk (KERN_ERR "BTRFS: has skinny extents\n" ); +printk (KERN_INFO "BTRFS: has skinny extents\n" );/* * flag our filesystem as having big metadata blocks if
Signature · 1 line
2.1.3