Skip to contentSkip to conversation

jbd2: only print the debugging information for tid wraparound once

PATCH In review Theodore Ts'o 2 participants 2 messages May 8, 2011 – May 9, 2011 Journalling layer for block devices (JBD2)

lore
Share & tools
lore

Theodore Ts'o

author maintainer
#0 lore raw

PATCH 1/1 jbd2: only print the debugging information for tid wraparound once

If we somehow wrap, we don't want to keep printing the warning message over and over again.

---
 fs/jbd2/journal.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
fs/jbd2/journal.c +5 -4
index 8c10004..cd2d341 100644
@@ -500,10 +500,11 @@ int __jbd2_log_start_commit(journal_t *journal, tid_t target)
 		/* This should never happen, but if it does, preserve
 		   the evidence before kjournald goes into a loop and
 		   increments j_commit_sequence beyond all recognition. */
-		WARN(1, "jbd: bad log_start_commit: %u %u %u %u\n",
-		     journal->j_commit_request, journal->j_commit_sequence,
-		     target, journal->j_running_transaction ? 
-		     journal->j_running_transaction->t_tid : 0);
+		WARN_ONCE(1, "jbd: bad log_start_commit: %u %u %u %u\n",
+			  journal->j_commit_request,
+			  journal->j_commit_sequence,
+			  target, journal->j_running_transaction ? 
+			  journal->j_running_transaction->t_tid : 0);
 	return 0;
 }
 
Signature · 1 line
1.7.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Theodore Ts'o

If we somehow wrap, we don't want to keep printing the warning message over and over again.

Quoted 31 lines

---
fs/jbd2/journal.c | 9 +++++----

1 files changed, 5 insertions(+), 4 deletions(-)
fs/jbd2/journal.c +5 -4
index 8c10004..cd2d341 100644
@@ -500,10 +500,11 @@ int __jbd2_log_start_commit(journal_t *journal, tid_t target)
 		/* This should never happen, but if it does, preserve
 		   the evidence before kjournald goes into a loop and
 		   increments j_commit_sequence beyond all recognition. */
-		WARN(1, "jbd: bad log_start_commit: %u %u %u %u\n",
-		     journal->j_commit_request, journal->j_commit_sequence,
-		     target, journal->j_running_transaction ? 
-		     journal->j_running_transaction->t_tid : 0);
+		WARN_ONCE(1, "jbd: bad log_start_commit: %u %u %u %u\n",
+			  journal->j_commit_request,
+			  journal->j_commit_sequence,
+			  target, journal->j_running_transaction ? 
+			  journal->j_running_transaction->t_tid : 0);
 	return 0;
 }
 
Signature · 6 lines
1.7.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Cheers, Andreas