From patchwork Thu Apr 19 09:45:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 153714 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 7388DB6FF0 for ; Thu, 19 Apr 2012 19:45:38 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKnvf-0007xD-A8; Thu, 19 Apr 2012 09:45:31 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKnvF-0007qM-Rj for kernel-team@lists.ubuntu.com; Thu, 19 Apr 2012 09:45:05 +0000 Received: from 5e0d6bec.bb.sky.com ([94.13.107.236] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SKnvF-0006R7-LY for kernel-team@lists.ubuntu.com; Thu, 19 Apr 2012 09:45:05 +0000 From: Luis Henriques To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/4] NFSv4: Rate limit the state manager for lock reclaim warning messages Date: Thu, 19 Apr 2012 10:45:01 +0100 Message-Id: <1334828703-11838-3-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1334828703-11838-1-git-send-email-luis.henriques@canonical.com> References: <1334828703-11838-1-git-send-email-luis.henriques@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: William Dauchy BugLink: https://bugs.launchpad.net/bugs/974664 Adding rate limit on `Lock reclaim failed` messages since it could fill up system logs Signed-off-by: William Dauchy Signed-off-by: Trond Myklebust (backported from commit 96dcadc2fdd111dca90d559f189a30c65394451a Conflicts: fs/nfs/nfs4state.c) Signed-off-by: Luis Henriques --- fs/nfs/nfs4state.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 66020ac..07354b7 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1186,8 +1186,9 @@ restart: spin_lock(&state->state_lock); list_for_each_entry(lock, &state->lock_states, ls_locks) { if (!(lock->ls_flags & NFS_LOCK_INITIALIZED)) - printk("%s: Lock reclaim failed!\n", - __func__); + pr_warn_ratelimited("NFS: " + "%s: Lock reclaim " + "failed!\n", __func__); } spin_unlock(&state->state_lock); nfs4_put_open_state(state);