aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorPaul Taysom <taysom@chromium.org>2013-05-28 07:51:21 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-05-28 07:51:21 -0400
commit566370a2e56837be98bc62d012fc2d2d11851db4 (patch)
tree2b4cf23aade0e58d15bd7a76c59a255c01a1f7de /fs/ext4
parenteee06c56784496805b198964c59fa8cd7c00bf48 (diff)
ext4: suppress ext4 orphan messages on mount
Suppress the messages releating to processing the ext4 orphan list ("truncating inode" and "deleting unreferenced inode") unless the debug option is on, since otherwise they end up taking up space in the log that could be used for more useful information. Tested by opening several files, unlinking them, then crashing the system, rebooting the system and examining /var/log/messages. Addresses the problem described in http://crbug.com/220976 Signed-off-by: Paul Taysom <taysom@chromium.org> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/super.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index c468560c8765..a9c143820f7d 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2164,9 +2164,10 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2164 list_add(&EXT4_I(inode)->i_orphan, &EXT4_SB(sb)->s_orphan); 2164 list_add(&EXT4_I(inode)->i_orphan, &EXT4_SB(sb)->s_orphan);
2165 dquot_initialize(inode); 2165 dquot_initialize(inode);
2166 if (inode->i_nlink) { 2166 if (inode->i_nlink) {
2167 ext4_msg(sb, KERN_DEBUG, 2167 if (test_opt(sb, DEBUG))
2168 "%s: truncating inode %lu to %lld bytes", 2168 ext4_msg(sb, KERN_DEBUG,
2169 __func__, inode->i_ino, inode->i_size); 2169 "%s: truncating inode %lu to %lld bytes",
2170 __func__, inode->i_ino, inode->i_size);
2170 jbd_debug(2, "truncating inode %lu to %lld bytes\n", 2171 jbd_debug(2, "truncating inode %lu to %lld bytes\n",
2171 inode->i_ino, inode->i_size); 2172 inode->i_ino, inode->i_size);
2172 mutex_lock(&inode->i_mutex); 2173 mutex_lock(&inode->i_mutex);
@@ -2175,9 +2176,10 @@ static void ext4_orphan_cleanup(struct super_block *sb,
2175 mutex_unlock(&inode->i_mutex); 2176 mutex_unlock(&inode->i_mutex);
2176 nr_truncates++; 2177 nr_truncates++;
2177 } else { 2178 } else {
2178 ext4_msg(sb, KERN_DEBUG, 2179 if (test_opt(sb, DEBUG))
2179 "%s: deleting unreferenced inode %lu", 2180 ext4_msg(sb, KERN_DEBUG,
2180 __func__, inode->i_ino); 2181 "%s: deleting unreferenced inode %lu",
2182 __func__, inode->i_ino);
2181 jbd_debug(2, "deleting unreferenced inode %lu\n", 2183 jbd_debug(2, "deleting unreferenced inode %lu\n",
2182 inode->i_ino); 2184 inode->i_ino);
2183 nr_orphans++; 2185 nr_orphans++;