[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131118164533.GF3921@quack.suse.cz>
Date: Mon, 18 Nov 2013 17:45:33 +0100
From: Jan Kara <jack@...e.cz>
To: Lubomir Rintel <lkundrak@...sk>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Jan Kara <jack@...e.cz>,
Theodore Ts'o <tytso@....edu>, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] jbd: Lower severity of aborted journal from EMERG to CRIT
On Fri 15-11-13 15:56:52, Lubomir Rintel wrote:
> According to Documentation/kernel-parameters.txt, KERN_EMERG is reserved for
> events that render system unusable.
>
> This is hardly the case in case of flash memory stick hardware removal without
> umounting. Syslog is often configured to forward messages with EMERG severity
> to all logged-in terminals, often causing unnecessary noise.
The logic behind using KERN_EMERG in that place is that the filesystem is
dead. If it was an important filesystem in your system, the whole system is
unusable. In kernel, we don't know whether the filesystem was important or
not. So KERN_EMERG isn't adequate in all the cases but KERN_CRIT is
neither. What if we made that message print also device name (it would be
more useful anyway in that case) and you could then filter out messages for
unimportant devices in syslogd?
Honza
>
> Signed-off-by: Lubomir Rintel <lkundrak@...sk>
> ---
> fs/jbd/journal.c | 2 +-
> fs/jbd2/journal.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
> index 2d04f9a..9dbc1b6 100644
> --- a/fs/jbd/journal.c
> +++ b/fs/jbd/journal.c
> @@ -605,7 +605,7 @@ out_unlock:
> spin_unlock(&journal->j_state_lock);
>
> if (unlikely(is_journal_aborted(journal))) {
> - printk(KERN_EMERG "journal commit I/O error\n");
> + printk(KERN_CRIT "journal commit I/O error\n");
> err = -EIO;
> }
> return err;
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 5203264..2d1f53c 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -719,7 +719,7 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid)
> read_unlock(&journal->j_state_lock);
>
> if (unlikely(is_journal_aborted(journal))) {
> - printk(KERN_EMERG "journal commit I/O error\n");
> + printk(KERN_CRIT "journal commit I/O error\n");
> err = -EIO;
> }
> return err;
> --
> 1.7.1
>
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists