ext4: use KERN_WARNING for warning messages
authorTheodore Ts'o <tytso@mit.edu>
Thu, 14 Feb 2013 20:11:41 +0000 (15:11 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 14 Feb 2013 20:11:41 +0000 (15:11 -0500)
Some messages printed related to a WARN_ON(1) were printed using
KERN_NOTICE.  Use KERN_WARNING or ext4_warning() instead so that
context related to the WARN_ON() is printed at the same printk warning
level (and log files, etc.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ialloc.c
fs/ext4/inode.c

index 91d8fe3aced37bd399706e9a9879fb10af26b31e..32fd2b9075dd4029925d11adb0b84df1a399a8b1 100644 (file)
@@ -1028,17 +1028,17 @@ iget_failed:
        inode = NULL;
 bad_orphan:
        ext4_warning(sb, "bad orphan inode %lu!  e2fsck was run?", ino);
-       printk(KERN_NOTICE "ext4_test_bit(bit=%d, block=%llu) = %d\n",
+       printk(KERN_WARNING "ext4_test_bit(bit=%d, block=%llu) = %d\n",
               bit, (unsigned long long)bitmap_bh->b_blocknr,
               ext4_test_bit(bit, bitmap_bh->b_data));
-       printk(KERN_NOTICE "inode=%p\n", inode);
+       printk(KERN_WARNING "inode=%p\n", inode);
        if (inode) {
-               printk(KERN_NOTICE "is_bad_inode(inode)=%d\n",
+               printk(KERN_WARNING "is_bad_inode(inode)=%d\n",
                       is_bad_inode(inode));
-               printk(KERN_NOTICE "NEXT_ORPHAN(inode)=%u\n",
+               printk(KERN_WARNING "NEXT_ORPHAN(inode)=%u\n",
                       NEXT_ORPHAN(inode));
-               printk(KERN_NOTICE "max_ino=%lu\n", max_ino);
-               printk(KERN_NOTICE "i_nlink=%u\n", inode->i_nlink);
+               printk(KERN_WARNING "max_ino=%lu\n", max_ino);
+               printk(KERN_WARNING "i_nlink=%u\n", inode->i_nlink);
                /* Avoid freeing blocks if we got a bad deleted inode */
                if (inode->i_nlink == 0)
                        inode->i_blocks = 0;
index 2fa18bb0bf3c2d91748db5b13077183896f61a52..b85d5dae726bc8659576d188faaee60a3b2cb28b 100644 (file)
@@ -343,7 +343,7 @@ void ext4_da_update_reserve_space(struct inode *inode,
        spin_lock(&ei->i_block_reservation_lock);
        trace_ext4_da_update_reserve_space(inode, used, quota_claim);
        if (unlikely(used > ei->i_reserved_data_blocks)) {
-               ext4_msg(inode->i_sb, KERN_NOTICE, "%s: ino %lu, used %d "
+               ext4_warning(inode->i_sb, "%s: ino %lu, used %d "
                         "with only %d reserved data blocks",
                         __func__, inode->i_ino, used,
                         ei->i_reserved_data_blocks);
@@ -352,7 +352,7 @@ void ext4_da_update_reserve_space(struct inode *inode,
        }
 
        if (unlikely(ei->i_allocated_meta_blocks > ei->i_reserved_meta_blocks)) {
-               ext4_msg(inode->i_sb, KERN_NOTICE, "%s: ino %lu, allocated %d "
+               ext4_warning(inode->i_sb, "%s: ino %lu, allocated %d "
                         "with only %d reserved metadata blocks\n", __func__,
                         inode->i_ino, ei->i_allocated_meta_blocks,
                         ei->i_reserved_meta_blocks);
@@ -1263,7 +1263,7 @@ static void ext4_da_release_space(struct inode *inode, int to_free)
                 * function is called from invalidate page, it's
                 * harmless to return without any action.
                 */
-               ext4_msg(inode->i_sb, KERN_NOTICE, "ext4_da_release_space: "
+               ext4_warning(inode->i_sb, "ext4_da_release_space: "
                         "ino %lu, to_free %d with only %d reserved "
                         "data blocks", inode->i_ino, to_free,
                         ei->i_reserved_data_blocks);