Skip to contentSkip to conversation

jbd2: Make barrier messages less scary

PATCH In review Eric Sandeen 2 participants 3 messages Jul 26, 2010 – Jul 27, 2010 Journalling layer for block devices (JBD2)

lore
Share & tools
lore
#0 lore raw

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
index 75716d3..3d15b28 100644
@@ -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);
maintainer
#1 lore raw
Quoted 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.

---

fs/jbd2/commit.c +2 -2
index 75716d3..3d15b28 100644
@@ -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

#2 lore raw
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.

---

fs/jbd2/commit.c +2 -2
index 75716d3..3d15b28 100644
@@ -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 -2
 		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?

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