From patchwork Sun May 8 23:38:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 94721 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A90C5B7052 for ; Mon, 9 May 2011 09:38:47 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177Ab1EHXii (ORCPT ); Sun, 8 May 2011 19:38:38 -0400 Received: from li9-11.members.linode.com ([67.18.176.11]:37308 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333Ab1EHXih (ORCPT ); Sun, 8 May 2011 19:38:37 -0400 Received: from root (helo=tytso-glaptop) by test.thunk.org with local-esmtp (Exim 4.69) (envelope-from ) id 1QJDYb-0003PY-2k; Sun, 08 May 2011 23:38:37 +0000 Received: from tytso by tytso-glaptop with local (Exim 4.71) (envelope-from ) id 1QJDYZ-0002EG-BO; Sun, 08 May 2011 19:38:35 -0400 From: Theodore Ts'o To: Ext4 Developers List Cc: Theodore Ts'o Subject: [PATCH] jbd2: only print the debugging information for tid wraparound once Date: Sun, 8 May 2011 19:38:35 -0400 Message-Id: <1304897915-8538-1-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.7.3.1 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on test.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org If we somehow wrap, we don't want to keep printing the warning message over and over again. Signed-off-by: "Theodore Ts'o" Acked-by: Andreas Dilger --- fs/jbd2/journal.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 8c10004..cd2d341 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -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; }