diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-09-29 15:51:30 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-09-29 15:51:30 -0400 |
commit | 90576c0b9a0b5323fc4bd7f23f49be0d234f36d1 (patch) | |
tree | d4a1ab6f923f1c9c7c87f13a828db72c1f4412c1 | |
parent | d3d1faf6a74496ea4435fd057c6a2cad49f3e523 (diff) |
ext4, jbd2: Drop unneeded printks at mount and unmount time
There are a number of kernel printk's which are printed when an ext4
filesystem is mounted and unmounted. Disable them to economize space
in the system logs. In addition, disabling the mballoc stats by
default saves a number of unneeded atomic operations for every block
allocation or deallocation.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | fs/ext4/extents.c | 2 | ||||
-rw-r--r-- | fs/ext4/mballoc.c | 2 | ||||
-rw-r--r-- | fs/ext4/mballoc.h | 2 | ||||
-rw-r--r-- | fs/ext4/super.c | 17 | ||||
-rw-r--r-- | fs/jbd2/journal.c | 9 |
5 files changed, 10 insertions, 22 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 10a63096a95a..10539e364283 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -2380,6 +2380,7 @@ void ext4_ext_init(struct super_block *sb) | |||
2380 | */ | 2380 | */ |
2381 | 2381 | ||
2382 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) { | 2382 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) { |
2383 | #if defined(AGGRESSIVE_TEST) || defined(CHECK_BINSEARCH) || defined(EXTENTS_STATS) | ||
2383 | printk(KERN_INFO "EXT4-fs: file extents enabled"); | 2384 | printk(KERN_INFO "EXT4-fs: file extents enabled"); |
2384 | #ifdef AGGRESSIVE_TEST | 2385 | #ifdef AGGRESSIVE_TEST |
2385 | printk(", aggressive tests"); | 2386 | printk(", aggressive tests"); |
@@ -2391,6 +2392,7 @@ void ext4_ext_init(struct super_block *sb) | |||
2391 | printk(", stats"); | 2392 | printk(", stats"); |
2392 | #endif | 2393 | #endif |
2393 | printk("\n"); | 2394 | printk("\n"); |
2395 | #endif | ||
2394 | #ifdef EXTENTS_STATS | 2396 | #ifdef EXTENTS_STATS |
2395 | spin_lock_init(&EXT4_SB(sb)->s_ext_stats_lock); | 2397 | spin_lock_init(&EXT4_SB(sb)->s_ext_stats_lock); |
2396 | EXT4_SB(sb)->s_ext_min = 1 << 30; | 2398 | EXT4_SB(sb)->s_ext_min = 1 << 30; |
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index c73d43995b13..3e2320e66721 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -2712,8 +2712,6 @@ int ext4_mb_init(struct super_block *sb, int needs_recovery) | |||
2712 | 2712 | ||
2713 | if (sbi->s_journal) | 2713 | if (sbi->s_journal) |
2714 | sbi->s_journal->j_commit_callback = release_blocks_on_commit; | 2714 | sbi->s_journal->j_commit_callback = release_blocks_on_commit; |
2715 | |||
2716 | printk(KERN_INFO "EXT4-fs: mballoc enabled\n"); | ||
2717 | return 0; | 2715 | return 0; |
2718 | } | 2716 | } |
2719 | 2717 | ||
diff --git a/fs/ext4/mballoc.h b/fs/ext4/mballoc.h index 188d3d709b24..14f25f253112 100644 --- a/fs/ext4/mballoc.h +++ b/fs/ext4/mballoc.h | |||
@@ -84,7 +84,7 @@ extern u8 mb_enable_debug; | |||
84 | * with 'ext4_mb_stats' allocator will collect stats that will be | 84 | * with 'ext4_mb_stats' allocator will collect stats that will be |
85 | * shown at umount. The collecting costs though! | 85 | * shown at umount. The collecting costs though! |
86 | */ | 86 | */ |
87 | #define MB_DEFAULT_STATS 1 | 87 | #define MB_DEFAULT_STATS 0 |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * files smaller than MB_DEFAULT_STREAM_THRESHOLD are served | 90 | * files smaller than MB_DEFAULT_STREAM_THRESHOLD are served |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 3f7e7010c098..e5b206a043a5 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -1673,13 +1673,6 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es, | |||
1673 | EXT4_INODES_PER_GROUP(sb), | 1673 | EXT4_INODES_PER_GROUP(sb), |
1674 | sbi->s_mount_opt); | 1674 | sbi->s_mount_opt); |
1675 | 1675 | ||
1676 | if (EXT4_SB(sb)->s_journal) { | ||
1677 | ext4_msg(sb, KERN_INFO, "%s journal on %s", | ||
1678 | EXT4_SB(sb)->s_journal->j_inode ? "internal" : | ||
1679 | "external", EXT4_SB(sb)->s_journal->j_devname); | ||
1680 | } else { | ||
1681 | ext4_msg(sb, KERN_INFO, "no journal"); | ||
1682 | } | ||
1683 | return res; | 1676 | return res; |
1684 | } | 1677 | } |
1685 | 1678 | ||
@@ -2885,12 +2878,12 @@ no_journal: | |||
2885 | "available"); | 2878 | "available"); |
2886 | } | 2879 | } |
2887 | 2880 | ||
2888 | if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { | 2881 | if (test_opt(sb, DELALLOC) && |
2882 | (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA)) { | ||
2889 | ext4_msg(sb, KERN_WARNING, "Ignoring delalloc option - " | 2883 | ext4_msg(sb, KERN_WARNING, "Ignoring delalloc option - " |
2890 | "requested data journaling mode"); | 2884 | "requested data journaling mode"); |
2891 | clear_opt(sbi->s_mount_opt, DELALLOC); | 2885 | clear_opt(sbi->s_mount_opt, DELALLOC); |
2892 | } else if (test_opt(sb, DELALLOC)) | 2886 | } |
2893 | ext4_msg(sb, KERN_INFO, "delayed allocation enabled"); | ||
2894 | 2887 | ||
2895 | err = ext4_setup_system_zone(sb); | 2888 | err = ext4_setup_system_zone(sb); |
2896 | if (err) { | 2889 | if (err) { |
@@ -3202,9 +3195,7 @@ static int ext4_load_journal(struct super_block *sb, | |||
3202 | return -EINVAL; | 3195 | return -EINVAL; |
3203 | } | 3196 | } |
3204 | 3197 | ||
3205 | if (journal->j_flags & JBD2_BARRIER) | 3198 | if (!(journal->j_flags & JBD2_BARRIER)) |
3206 | ext4_msg(sb, KERN_INFO, "barriers enabled"); | ||
3207 | else | ||
3208 | ext4_msg(sb, KERN_INFO, "barriers disabled"); | 3199 | ext4_msg(sb, KERN_INFO, "barriers disabled"); |
3209 | 3200 | ||
3210 | if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) { | 3201 | if (!really_read_only && test_opt(sb, UPDATE_JOURNAL)) { |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 53b86e16e5fe..977a8dafb76d 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -136,10 +136,6 @@ static int kjournald2(void *arg) | |||
136 | journal->j_task = current; | 136 | journal->j_task = current; |
137 | wake_up(&journal->j_wait_done_commit); | 137 | wake_up(&journal->j_wait_done_commit); |
138 | 138 | ||
139 | printk(KERN_INFO "kjournald2 starting: pid %d, dev %s, " | ||
140 | "commit interval %ld seconds\n", current->pid, | ||
141 | journal->j_devname, journal->j_commit_interval / HZ); | ||
142 | |||
143 | /* | 139 | /* |
144 | * And now, wait forever for commit wakeup events. | 140 | * And now, wait forever for commit wakeup events. |
145 | */ | 141 | */ |
@@ -223,7 +219,8 @@ static int jbd2_journal_start_thread(journal_t *journal) | |||
223 | { | 219 | { |
224 | struct task_struct *t; | 220 | struct task_struct *t; |
225 | 221 | ||
226 | t = kthread_run(kjournald2, journal, "kjournald2"); | 222 | t = kthread_run(kjournald2, journal, "jbd2/%s", |
223 | journal->j_devname); | ||
227 | if (IS_ERR(t)) | 224 | if (IS_ERR(t)) |
228 | return PTR_ERR(t); | 225 | return PTR_ERR(t); |
229 | 226 | ||
@@ -1115,7 +1112,7 @@ journal_t * jbd2_journal_init_inode (struct inode *inode) | |||
1115 | while ((p = strchr(p, '/'))) | 1112 | while ((p = strchr(p, '/'))) |
1116 | *p = '!'; | 1113 | *p = '!'; |
1117 | p = journal->j_devname + strlen(journal->j_devname); | 1114 | p = journal->j_devname + strlen(journal->j_devname); |
1118 | sprintf(p, ":%lu", journal->j_inode->i_ino); | 1115 | sprintf(p, "-%lu", journal->j_inode->i_ino); |
1119 | jbd_debug(1, | 1116 | jbd_debug(1, |
1120 | "journal %p: inode %s/%ld, size %Ld, bits %d, blksize %ld\n", | 1117 | "journal %p: inode %s/%ld, size %Ld, bits %d, blksize %ld\n", |
1121 | journal, inode->i_sb->s_id, inode->i_ino, | 1118 | journal, inode->i_sb->s_id, inode->i_ino, |