diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-12 18:01:48 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-12 18:15:22 -0400 |
commit | 9a3ba432330e504ac61ff0043dbdaba7cea0e35a (patch) | |
tree | 1efadb9ff2c7a662bf8cb6da9a7bd70595810b02 /fs/nfs/callback_xdr.c | |
parent | 0097143c12e279f5d454e0f636a02afff102cc6a (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/callback_xdr.c')
-rw-r--r-- | fs/nfs/callback_xdr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c index fd6cfdb917d..95bfc243992 100644 --- a/fs/nfs/callback_xdr.c +++ b/fs/nfs/callback_xdr.c | |||
@@ -9,6 +9,8 @@ | |||
9 | #include <linux/sunrpc/svc.h> | 9 | #include <linux/sunrpc/svc.h> |
10 | #include <linux/nfs4.h> | 10 | #include <linux/nfs4.h> |
11 | #include <linux/nfs_fs.h> | 11 | #include <linux/nfs_fs.h> |
12 | #include <linux/ratelimit.h> | ||
13 | #include <linux/printk.h> | ||
12 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
13 | #include <linux/sunrpc/bc_xprt.h> | 15 | #include <linux/sunrpc/bc_xprt.h> |
14 | #include "nfs4_fs.h" | 16 | #include "nfs4_fs.h" |
@@ -167,7 +169,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound | |||
167 | if (hdr->minorversion <= 1) { | 169 | if (hdr->minorversion <= 1) { |
168 | hdr->cb_ident = ntohl(*p++); /* ignored by v4.1 */ | 170 | hdr->cb_ident = ntohl(*p++); /* ignored by v4.1 */ |
169 | } else { | 171 | } else { |
170 | printk(KERN_WARNING "NFS: %s: NFSv4 server callback with " | 172 | pr_warn_ratelimited("NFS: %s: NFSv4 server callback with " |
171 | "illegal minor version %u!\n", | 173 | "illegal minor version %u!\n", |
172 | __func__, hdr->minorversion); | 174 | __func__, hdr->minorversion); |
173 | return htonl(NFS4ERR_MINOR_VERS_MISMATCH); | 175 | return htonl(NFS4ERR_MINOR_VERS_MISMATCH); |