From: "J. Bruce Fields" <bfields@fieldses.org>
To: Olga Kornievskaia <aglo@umich.edu>
Cc: linux-nfs@vger.kernel.org, Trond Myklebust <trond@netapp.com>
Subject: Re: [PATCH 1/1] silence-call-timeout-printk
Date: Thu, 27 Mar 2008 15:54:45 -0400 [thread overview]
Message-ID: <20080327195445.GI32540@fieldses.org> (raw)
In-Reply-To: <1206643752-11132-1-git-send-email-aglo@umich.edu>
On Thu, Mar 27, 2008 at 02:49:12PM -0400, Olga Kornievskaia wrote:
> When the client's callback server goes away, the server's callback client
> tries to contact the server and times out. For nfsd, it is beneficial to
> printout a message when the client is unable to contact the server. For
> the callback server, the same message is printed yet it is really not
> an error. Thus we need a way to silence the message for the callback
> and yet print it for other cases.
>
> Signed-off-by: Olga Kornievskaia <aglo@umich.edu>
> ---
> fs/nfsd/nfs4callback.c | 1 +
> include/linux/sunrpc/clnt.h | 1 +
> net/sunrpc/clnt.c | 6 ++++--
> 3 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index aae2b29..bf7d57e 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -400,6 +400,7 @@ static int do_probe_callback(void *data)
> status = PTR_ERR(client);
> goto out_err;
> }
> + client->cl_quiet = 1;
>
> status = rpc_call_sync(client, &msg, RPC_TASK_SOFT);
>
> diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
> index 129a86e..0a1141e 100644
> --- a/include/linux/sunrpc/clnt.h
> +++ b/include/linux/sunrpc/clnt.h
> @@ -57,6 +57,7 @@ struct rpc_clnt {
> struct rpc_timeout cl_timeout_default;
> struct rpc_program * cl_program;
> char cl_inline_name[32];
> + int cl_quiet; /* silences call_timeout printk */
> };
>
> /*
> diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
> index 8c6a7f1..5a2a718 100644
> --- a/net/sunrpc/clnt.c
> +++ b/net/sunrpc/clnt.c
> @@ -1160,8 +1160,10 @@ call_timeout(struct rpc_task *task)
> task->tk_timeouts++;
>
> if (RPC_IS_SOFT(task)) {
> - printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
> - clnt->cl_protname, clnt->cl_server);
> + if (!clnt->cl_quiet)
> + printk(KERN_NOTICE "%s: server %s not responding, "
> + "timed out\n", clnt->cl_protname,
Run linux/scripts/checkpath.pl on patches and it'll warn you about silly
stuff like the extra space at the end of that line.
Other than that--I'd like to do this. Trond?
--b.
> + clnt->cl_server);
> rpc_exit(task, -EIO);
> return;
> }
> --
> 1.5.3.3
>
next prev parent reply other threads:[~2008-03-27 19:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-27 18:49 [PATCH 1/1] silence-call-timeout-printk Olga Kornievskaia
2008-03-27 19:54 ` J. Bruce Fields [this message]
2008-03-27 20:03 ` Trond Myklebust
[not found] ` <1206648229.15396.2.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-27 20:23 ` J. Bruce Fields
2008-03-27 20:31 ` Trond Myklebust
[not found] ` <1206649882.15396.17.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2008-03-27 20:45 ` J. Bruce Fields
2008-03-27 20:36 ` Talpey, Thomas
[not found] ` <EXNANE01kO22ZhCl8ai000001cd-kboziUmgGqYSZCGxjG3uujkOHZLvdrmu@public.gmane.org>
2008-03-27 20:53 ` J. Bruce Fields
2008-03-27 20:57 ` Trond Myklebust
2008-03-28 15:57 ` Talpey, Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080327195445.GI32540@fieldses.org \
--to=bfields@fieldses.org \
--cc=aglo@umich.edu \
--cc=linux-nfs@vger.kernel.org \
--cc=trond@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.