jbd2: only print the debugging information for tid wraparound once
authorTheodore Ts'o <tytso@mit.edu>
Sun, 8 May 2011 23:37:54 +0000 (19:37 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 8 May 2011 23:37:54 +0000 (19:37 -0400)
If we somehow wrap, we don't want to keep printing the warning message
over and over again.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/jbd2/journal.c

index 8c10004f7876093784c9fad4c7a49068b6b950a7..cd2d341f602e0f659277a46a08ad5f3f3f9cc9ed 100644 (file)
@@ -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;
 }