Commit 2314b07c authored by Alexey Fisher's avatar Alexey Fisher Committed by Jan Kara

ext2: Unify log messages in ext2

make messages produced by ext2 more unified. It should be
easy to parse.

dmesg before patch:
[ 4893.684892] reservations ON
[ 4893.684896] xip option not supported
[ 4893.684961] EXT2-fs warning: mounting ext3 filesystem as ext2
[ 4893.684964] EXT2-fs warning: maximal mount count reached, running
e2fsck is recommended
[ 4893.684990] EXT II FS: 0.5b, 95/08/09, bs=1024, fs=1024, gc=2,
bpg=8192, ipg=1280, mo=80010]

dmesg after patch:
[ 4893.684892] EXT2-fs (loop0): reservations ON
[ 4893.684896] EXT2-fs (loop0): xip option not supported
[ 4893.684961] EXT2-fs (loop0): warning: mounting ext3 filesystem as
ext2
[ 4893.684964] EXT2-fs (loop0): warning: maximal mount count reached,
running e2fsck is recommended
[ 4893.684990] EXT2-fs (loop0): 0.5b, 95/08/09, bs=1024, fs=1024, gc=2,
bpg=8192, ipg=1280, mo=80010]
Signed-off-by: default avatarAlexey Fisher <bug-track@fisher-privat.net>
Reviewed-by: default avatarAndreas Dilger <adilger@sun.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent dee1d3b6
...@@ -142,7 +142,7 @@ struct dentry *ext2_get_parent(struct dentry *child); ...@@ -142,7 +142,7 @@ struct dentry *ext2_get_parent(struct dentry *child);
/* super.c */ /* super.c */
extern void ext2_error (struct super_block *, const char *, const char *, ...) extern void ext2_error (struct super_block *, const char *, const char *, ...)
__attribute__ ((format (printf, 3, 4))); __attribute__ ((format (printf, 3, 4)));
extern void ext2_warning (struct super_block *, const char *, const char *, ...) extern void ext2_msg(struct super_block *, const char *, const char *, ...)
__attribute__ ((format (printf, 3, 4))); __attribute__ ((format (printf, 3, 4)));
extern void ext2_update_dynamic_rev (struct super_block *sb); extern void ext2_update_dynamic_rev (struct super_block *sb);
extern void ext2_write_super (struct super_block *); extern void ext2_write_super (struct super_block *);
......
...@@ -137,7 +137,8 @@ static int ext2_block_to_path(struct inode *inode, ...@@ -137,7 +137,8 @@ static int ext2_block_to_path(struct inode *inode,
int final = 0; int final = 0;
if (i_block < 0) { if (i_block < 0) {
ext2_warning (inode->i_sb, "ext2_block_to_path", "block < 0"); ext2_msg(inode->i_sb, KERN_WARNING,
"warning: %s: block < 0", __func__);
} else if (i_block < direct_blocks) { } else if (i_block < direct_blocks) {
offsets[n++] = i_block; offsets[n++] = i_block;
final = direct_blocks; final = direct_blocks;
...@@ -157,7 +158,8 @@ static int ext2_block_to_path(struct inode *inode, ...@@ -157,7 +158,8 @@ static int ext2_block_to_path(struct inode *inode,
offsets[n++] = i_block & (ptrs - 1); offsets[n++] = i_block & (ptrs - 1);
final = ptrs; final = ptrs;
} else { } else {
ext2_warning (inode->i_sb, "ext2_block_to_path", "block > big"); ext2_msg(inode->i_sb, KERN_WARNING,
"warning: %s: block is too big", __func__);
} }
if (boundary) if (boundary)
*boundary = final - 1 - (i_block & (ptrs - 1)); *boundary = final - 1 - (i_block & (ptrs - 1));
......
This diff is collapsed.
...@@ -69,8 +69,9 @@ void ext2_xip_verify_sb(struct super_block *sb) ...@@ -69,8 +69,9 @@ void ext2_xip_verify_sb(struct super_block *sb)
if ((sbi->s_mount_opt & EXT2_MOUNT_XIP) && if ((sbi->s_mount_opt & EXT2_MOUNT_XIP) &&
!sb->s_bdev->bd_disk->fops->direct_access) { !sb->s_bdev->bd_disk->fops->direct_access) {
sbi->s_mount_opt &= (~EXT2_MOUNT_XIP); sbi->s_mount_opt &= (~EXT2_MOUNT_XIP);
ext2_warning(sb, __func__, ext2_msg(sb, KERN_WARNING,
"ignoring xip option - not supported by bdev"); "warning: ignoring xip option - "
"not supported by bdev");
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment