Skip to content

Commit 7568507

Browse files
jankaratytso
authored andcommitted
jbd2: revise KERN_EMERG error messages
Some of KERN_EMERG printk messages do not really deserve this log level and the one in log_wait_commit() is even rather useless (the journal has been previously aborted and *that* is where we should have been complaining). So make some messages just KERN_ERR and remove the useless message. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent f6c07ca commit 7568507

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

‎fs/jbd2/journal.c‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid)
702702
read_lock(&journal->j_state_lock);
703703
#ifdef CONFIG_JBD2_DEBUG
704704
if (!tid_geq(journal->j_commit_request, tid)) {
705-
printk(KERN_EMERG
705+
printk(KERN_ERR
706706
"%s: error: j_commit_request=%d, tid=%d\n",
707707
__func__, journal->j_commit_request, tid);
708708
}
@@ -718,10 +718,8 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid)
718718
}
719719
read_unlock(&journal->j_state_lock);
720720

721-
if (unlikely(is_journal_aborted(journal))) {
722-
printk(KERN_EMERG "journal commit I/O error\n");
721+
if (unlikely(is_journal_aborted(journal)))
723722
err = -EIO;
724-
}
725723
return err;
726724
}
727725

@@ -2645,7 +2643,7 @@ static void __exit journal_exit(void)
26452643
#ifdef CONFIG_JBD2_DEBUG
26462644
int n = atomic_read(&nr_journal_heads);
26472645
if (n)
2648-
printk(KERN_EMERG "JBD2: leaked %d journal_heads!\n", n);
2646+
printk(KERN_ERR "JBD2: leaked %d journal_heads!\n", n);
26492647
#endif
26502648
jbd2_remove_jbd_stats_proc_entry();
26512649
jbd2_journal_destroy_caches();

‎fs/jbd2/transaction.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
932932
jbd2_alloc(jh2bh(jh)->b_size,
933933
GFP_NOFS);
934934
if (!frozen_buffer) {
935-
printk(KERN_EMERG
935+
printk(KERN_ERR
936936
"%s: OOM for frozen_buffer\n",
937937
__func__);
938938
JBUFFER_TRACE(jh, "oom!");
@@ -1166,7 +1166,7 @@ int jbd2_journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
11661166
if (!jh->b_committed_data) {
11671167
committed_data = jbd2_alloc(jh2bh(jh)->b_size, GFP_NOFS);
11681168
if (!committed_data) {
1169-
printk(KERN_EMERG "%s: No memory for committed data\n",
1169+
printk(KERN_ERR "%s: No memory for committed data\n",
11701170
__func__);
11711171
err = -ENOMEM;
11721172
goto out;
@@ -1308,7 +1308,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
13081308
JBUFFER_TRACE(jh, "fastpath");
13091309
if (unlikely(jh->b_transaction !=
13101310
journal->j_running_transaction)) {
1311-
printk(KERN_EMERG "JBD: %s: "
1311+
printk(KERN_ERR "JBD: %s: "
13121312
"jh->b_transaction (%llu, %p, %u) != "
13131313
"journal->j_running_transaction (%p, %u)",
13141314
journal->j_devname,
@@ -1335,7 +1335,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
13351335
JBUFFER_TRACE(jh, "already on other transaction");
13361336
if (unlikely(jh->b_transaction !=
13371337
journal->j_committing_transaction)) {
1338-
printk(KERN_EMERG "JBD: %s: "
1338+
printk(KERN_ERR "JBD: %s: "
13391339
"jh->b_transaction (%llu, %p, %u) != "
13401340
"journal->j_committing_transaction (%p, %u)",
13411341
journal->j_devname,
@@ -1348,7 +1348,7 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
13481348
ret = -EINVAL;
13491349
}
13501350
if (unlikely(jh->b_next_transaction != transaction)) {
1351-
printk(KERN_EMERG "JBD: %s: "
1351+
printk(KERN_ERR "JBD: %s: "
13521352
"jh->b_next_transaction (%llu, %p, %u) != "
13531353
"transaction (%p, %u)",
13541354
journal->j_devname,

0 commit comments

Comments
 (0)