aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-12 18:01:48 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-12 18:15:22 -0400
commit9a3ba432330e504ac61ff0043dbdaba7cea0e35a (patch)
tree1efadb9ff2c7a662bf8cb6da9a7bd70595810b02 /fs/nfs/nfs4state.c
parent0097143c12e279f5d454e0f636a02afff102cc6a (diff)
NFSv4: Rate limit the state manager warning messages
Prevent the state manager from filling up system logs when recovery fails on the server. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 7c586070d028..cb708b20a775 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -984,7 +984,7 @@ static void nfs_increment_seqid(int status, struct nfs_seqid *seqid)
984 case -NFS4ERR_BAD_SEQID: 984 case -NFS4ERR_BAD_SEQID:
985 if (seqid->sequence->flags & NFS_SEQID_CONFIRMED) 985 if (seqid->sequence->flags & NFS_SEQID_CONFIRMED)
986 return; 986 return;
987 printk(KERN_WARNING "NFS: v4 server returned a bad" 987 pr_warn_ratelimited("NFS: v4 server returned a bad"
988 " sequence-id error on an" 988 " sequence-id error on an"
989 " unconfirmed sequence %p!\n", 989 " unconfirmed sequence %p!\n",
990 seqid->sequence); 990 seqid->sequence);
@@ -1840,7 +1840,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
1840 } while (atomic_read(&clp->cl_count) > 1); 1840 } while (atomic_read(&clp->cl_count) > 1);
1841 return; 1841 return;
1842out_error: 1842out_error:
1843 printk(KERN_WARNING "NFS: state manager failed on NFSv4 server %s" 1843 pr_warn_ratelimited("NFS: state manager failed on NFSv4 server %s"
1844 " with error %d\n", clp->cl_hostname, -status); 1844 " with error %d\n", clp->cl_hostname, -status);
1845 nfs4_end_drain_session(clp); 1845 nfs4_end_drain_session(clp);
1846 nfs4_clear_state_manager_bit(clp); 1846 nfs4_clear_state_manager_bit(clp);