]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.2-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Mar 2012 23:47:52 +0000 (16:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Mar 2012 23:47:52 +0000 (16:47 -0700)
added patches:
nfsv4-rate-limit-the-state-manager-warning-messages.patch

queue-3.2/nfsv4-rate-limit-the-state-manager-warning-messages.patch [new file with mode: 0644]
queue-3.2/series

diff --git a/queue-3.2/nfsv4-rate-limit-the-state-manager-warning-messages.patch b/queue-3.2/nfsv4-rate-limit-the-state-manager-warning-messages.patch
new file mode 100644 (file)
index 0000000..393c5a4
--- /dev/null
@@ -0,0 +1,72 @@
+From 9a3ba432330e504ac61ff0043dbdaba7cea0e35a Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+Date: Mon, 12 Mar 2012 18:01:48 -0400
+Subject: NFSv4: Rate limit the state manager warning messages
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+commit 9a3ba432330e504ac61ff0043dbdaba7cea0e35a upstream.
+
+Prevent the state manager from filling up system logs when recovery
+fails on the server.
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/nfs/callback_xdr.c |    4 +++-
+ fs/nfs/nfs4proc.c     |    2 +-
+ fs/nfs/nfs4state.c    |    4 ++--
+ 3 files changed, 6 insertions(+), 4 deletions(-)
+
+--- a/fs/nfs/callback_xdr.c
++++ b/fs/nfs/callback_xdr.c
+@@ -9,6 +9,8 @@
+ #include <linux/sunrpc/svc.h>
+ #include <linux/nfs4.h>
+ #include <linux/nfs_fs.h>
++#include <linux/ratelimit.h>
++#include <linux/printk.h>
+ #include <linux/slab.h>
+ #include <linux/sunrpc/bc_xprt.h>
+ #include "nfs4_fs.h"
+@@ -167,7 +169,7 @@ static __be32 decode_compound_hdr_arg(st
+       if (hdr->minorversion <= 1) {
+               hdr->cb_ident = ntohl(*p++); /* ignored by v4.1 */
+       } else {
+-              printk(KERN_WARNING "%s: NFSv4 server callback with "
++              pr_warn_ratelimited("NFS: %s: NFSv4 server callback with "
+                       "illegal minor version %u!\n",
+                       __func__, hdr->minorversion);
+               return htonl(NFS4ERR_MINOR_VERS_MISMATCH);
+--- a/fs/nfs/nfs4proc.c
++++ b/fs/nfs/nfs4proc.c
+@@ -1838,7 +1838,7 @@ static struct nfs4_state *nfs4_do_open(s
+                * the user though...
+                */
+               if (status == -NFS4ERR_BAD_SEQID) {
+-                      printk(KERN_WARNING "NFS: v4 server %s "
++                      pr_warn_ratelimited("NFS: v4 server %s "
+                                       " returned a bad sequence-id error!\n",
+                                       NFS_SERVER(dir)->nfs_client->cl_hostname);
+                       exception.retry = 1;
+--- a/fs/nfs/nfs4state.c
++++ b/fs/nfs/nfs4state.c
+@@ -935,7 +935,7 @@ static void nfs_increment_seqid(int stat
+               case -NFS4ERR_BAD_SEQID:
+                       if (seqid->sequence->flags & NFS_SEQID_CONFIRMED)
+                               return;
+-                      printk(KERN_WARNING "NFS: v4 server returned a bad"
++                      pr_warn_ratelimited("NFS: v4 server returned a bad"
+                                       " sequence-id error on an"
+                                       " unconfirmed sequence %p!\n",
+                                       seqid->sequence);
+@@ -1764,7 +1764,7 @@ static void nfs4_state_manager(struct nf
+       } while (atomic_read(&clp->cl_count) > 1);
+       return;
+ out_error:
+-      printk(KERN_WARNING "Error: state manager failed on NFSv4 server %s"
++      pr_warn_ratelimited("NFS: state manager failed on NFSv4 server %s"
+                       " with error %d\n", clp->cl_hostname, -status);
+       nfs4_end_drain_session(clp);
+       nfs4_clear_state_manager_bit(clp);
index 69b76389fd093b0616f529679440ec265939f6b0..71ced63f2de8786482afce469fe230cd84f68017 100644 (file)
@@ -106,3 +106,4 @@ hwmon-fam15h_power-correct-sign-extension-of-running_avg_capture.patch
 lgdt330x-fix-signedness-error-in-i2c_read_demod_bytes.patch
 pvrusb2-fix-7mhz-8mhz-dvb-t-tuner-support-for-hvr1900-rev-d1f5.patch
 mxl111sf-fix-error-on-stream-stop-in-mxl111sf_ep6_streaming_ctrl.patch
+nfsv4-rate-limit-the-state-manager-warning-messages.patch