From fde63896ca16e27e34f5e6c8a75a8ebd70d628e1 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Thu, 28 Apr 2022 12:58:23 +0200 Subject: [PATCH] ext4: Reduce logging 186527f84a0b ("ext4: Reduce "mounted" log from INFO to DEBUG") reduced the logging of "EXT4-fs (): mounted filesystem..."- messages by setting the level from KERN_INFO to KERN_DEBUG. This did not have the desired effect, because we usually log DEBUG messages to /var/log/messages as well. Also we still fill the ring buffer and lose other information in dmesg. Disable the logging completly. While we are at it, disable "EXT4-fs (): shut down requested (2)"- messages, too, as we _might_ use that ioctl in the future for our cluster jobs. --- fs/ext4/ioctl.c | 2 +- fs/ext4/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index f61b59045c6d3..8d1b4b04eec1a 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -570,7 +570,7 @@ static int ext4_shutdown(struct super_block *sb, unsigned long arg) if (ext4_forced_shutdown(sbi)) return 0; - ext4_msg(sb, KERN_ALERT, "shut down requested (%d)", flags); + while (0) ext4_msg(sb, KERN_ALERT, "shut down requested (%d)", flags); trace_ext4_shutdown(sb, flags); switch (flags) { diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 774bafe1f527e..cd9a26ca12e02 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4998,7 +4998,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) "the device does not support discard"); } - if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount")) + if (0 && ___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs mount")) ext4_msg(sb, KERN_DEBUG, "mounted filesystem with%s. " "Opts: %.*s%s%s. Quota mode: %s.", descr, (int) sizeof(sbi->s_es->s_mount_opts),