jbd2: Make barrier messages less scary
PATCH 1/1 jbd2: Make barrier messages less scary
Saying things like "sync failed" when a device does not support barriers makes users slightly more worried than they need to be; rather than talking about sync failures, let's just state the barrier-based facts.
---
fs/jbd2/commit.c +4 -4
@@ -150,8 +150,8 @@ static int journal_submit_commit_record(journal_t *journal,*/ if (ret == -EOPNOTSUPP && barrier_done) {printk (KERN_WARNING -"JBD: barrier-based sync failed on %s - " -"disabling barriers\n" , journal->j_devname); +"JBD2: Disabling barriers on %s, " +"not supported by device\n" , journal->j_devname);spin_lock (&journal->j_state_lock); journal->j_flags &= ~JBD2_BARRIER ;spin_unlock (&journal->j_state_lock);
@@ -180,8 +180,8 @@ retry:wait_on_buffer (bh);if (buffer_eopnotsupp (bh) && (journal->j_flags &JBD2_BARRIER )) {printk (KERN_WARNING -"JBD2: wait_on_commit_record: sync failed on %s - " -"disabling barriers\n" , journal->j_devname); +"JBD2: %s: barriers no longer supported on %s - " +"disabling barriers\n" , __func__, journal->j_devname);spin_lock (&journal->j_state_lock); journal->j_flags &= ~JBD2_BARRIER ;spin_unlock (&journal->j_state_lock);
Ted Ts'o
maintainerQuoted 24 lines · Eric Sandeen
Saying things like "sync failed" when a device does not support barriers makes users slightly more worried than they need to be; rather than talking about sync failures, let's just state the barrier-based facts.
Signed-off-by Eric Sandeen <[email protected]>---
fs/jbd2/commit.c +2
-2@@ -150,8 +150,8 @@ static int journal_submit_commit_record(journal_t *journal,*/ if (ret == -EOPNOTSUPP && barrier_done) {printk (KERN_WARNING -"JBD: barrier-based sync failed on %s - " -"disabling barriers\n" , journal->j_devname); +"JBD2: Disabling barriers on %s, " +"not supported by device\n" , journal->j_devname);spin_lock (&journal->j_state_lock); journal->j_flags &= ~JBD2_BARRIER ;spin_unlock (&journal->j_state_lock);
fs/jbd2/commit.c retry: · line 184
Quoted 7 lines
fs/jbd2/commit.c +2
-2@@ -180,8 +180,8 @@ retry:wait_on_buffer (bh);if (buffer_eopnotsupp (bh) && (journal->j_flags &JBD2_BARRIER )) {printk (KERN_WARNING -"JBD2: wait_on_commit_record: sync failed on %s - " -"disabling barriers\n" , journal->j_devname); +"JBD2: %s: barriers no longer supported on %s - " +"disabling barriers\n" , __func__, journal->j_devname);
Any reason this message has "no longer supported" as opposed to the "not supported by device" printed above?
- Ted
Quoted 27 lines · Ted Ts'o
Quoted 26 lines · Eric Sandeen
Saying things like "sync failed" when a device does not support barriers makes users slightly more worried than they need to be; rather than talking about sync failures, let's just state the barrier-based facts.
Signed-off-by Eric Sandeen <[email protected]>---
fs/jbd2/commit.c +2
-2@@ -150,8 +150,8 @@ static int journal_submit_commit_record(journal_t *journal,*/ if (ret == -EOPNOTSUPP && barrier_done) {printk (KERN_WARNING -"JBD: barrier-based sync failed on %s - " -"disabling barriers\n" , journal->j_devname); +"JBD2: Disabling barriers on %s, " +"not supported by device\n" , journal->j_devname);spin_lock (&journal->j_state_lock); journal->j_flags &= ~JBD2_BARRIER ;spin_unlock (&journal->j_state_lock);@@ -180,8 +180,8 @@ retry:wait_on_buffer (bh);if (buffer_eopnotsupp (bh) && (journal->j_flags &JBD2_BARRIER )) {
Quoted 8 lines
fs/jbd2/commit.c retry: · line 184
Quoted 5 lines
fs/jbd2/commit.c +2
-2printk (KERN_WARNING -"JBD2: wait_on_commit_record: sync failed on %s - " -"disabling barriers\n" , journal->j_devname); +"JBD2: %s: barriers no longer supported on %s - " +"disabling barriers\n" , __func__, journal->j_devname);Any reason this message has "no longer supported" as opposed to the "not supported by device" printed above?
Hm. In the non-async case, we'd have already tested it in journal_submit_commit_record, right, and if we failed here, they got lost somehow.
But in the async case, this is the first test we'd get... so maybe it should just use the same message as the first.
-Eric
Quoted 1 line
- Ted