Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 566370a2 authored by Paul Taysom's avatar Paul Taysom Committed by Theodore Ts'o
Browse files

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: default avatarPaul Taysom <taysom@chromium.org>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent eee06c56
Loading
Loading
Loading
Loading
+8 −6
Original line number Original line Diff line number Diff line
@@ -2164,6 +2164,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
		list_add(&EXT4_I(inode)->i_orphan, &EXT4_SB(sb)->s_orphan);
		list_add(&EXT4_I(inode)->i_orphan, &EXT4_SB(sb)->s_orphan);
		dquot_initialize(inode);
		dquot_initialize(inode);
		if (inode->i_nlink) {
		if (inode->i_nlink) {
			if (test_opt(sb, DEBUG))
				ext4_msg(sb, KERN_DEBUG,
				ext4_msg(sb, KERN_DEBUG,
					"%s: truncating inode %lu to %lld bytes",
					"%s: truncating inode %lu to %lld bytes",
					__func__, inode->i_ino, inode->i_size);
					__func__, inode->i_ino, inode->i_size);
@@ -2175,6 +2176,7 @@ static void ext4_orphan_cleanup(struct super_block *sb,
			mutex_unlock(&inode->i_mutex);
			mutex_unlock(&inode->i_mutex);
			nr_truncates++;
			nr_truncates++;
		} else {
		} else {
			if (test_opt(sb, DEBUG))
				ext4_msg(sb, KERN_DEBUG,
				ext4_msg(sb, KERN_DEBUG,
					"%s: deleting unreferenced inode %lu",
					"%s: deleting unreferenced inode %lu",
					__func__, inode->i_ino);
					__func__, inode->i_ino);