diff options
author | Olga Kornievskaia <aglo@citi.umich.edu> | 2008-06-09 16:51:31 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 12:09:10 -0400 |
commit | b6b6152c46861dd914d0e6cea9c27df057d6e235 (patch) | |
tree | 0d63ce529c13c09a1997da06199e27b049bb55aa /net/sunrpc | |
parent | 48b605f83c920d8daa50e43fc2c7f718e04c7bfa (diff) |
rpc: bring back cl_chatty
The cl_chatty flag alows us to control whether a given rpc client leaves
"server X not responding, timed out"
messages in the syslog. Such messages make sense for ordinary nfs
clients (where an unresponsive server means applications on the
mountpoint are probably hanging), but not for the callback client (which
can fail more commonly, with the only result just of disabling some
optimizations).
Previously cl_chatty was removed, do to lack of users; reinstate it, and
use it for the nfsd's callback client.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 0530eea37b59..09631f6e30e9 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -324,6 +324,8 @@ struct rpc_clnt *rpc_create(struct rpc_create_args *args) | |||
324 | clnt->cl_autobind = 1; | 324 | clnt->cl_autobind = 1; |
325 | if (args->flags & RPC_CLNT_CREATE_DISCRTRY) | 325 | if (args->flags & RPC_CLNT_CREATE_DISCRTRY) |
326 | clnt->cl_discrtry = 1; | 326 | clnt->cl_discrtry = 1; |
327 | if (!(args->flags & RPC_CLNT_CREATE_QUIET)) | ||
328 | clnt->cl_chatty = 1; | ||
327 | 329 | ||
328 | return clnt; | 330 | return clnt; |
329 | } | 331 | } |
@@ -1149,7 +1151,8 @@ call_status(struct rpc_task *task) | |||
1149 | rpc_exit(task, status); | 1151 | rpc_exit(task, status); |
1150 | break; | 1152 | break; |
1151 | default: | 1153 | default: |
1152 | printk("%s: RPC call returned error %d\n", | 1154 | if (clnt->cl_chatty) |
1155 | printk("%s: RPC call returned error %d\n", | ||
1153 | clnt->cl_protname, -status); | 1156 | clnt->cl_protname, -status); |
1154 | rpc_exit(task, status); | 1157 | rpc_exit(task, status); |
1155 | } | 1158 | } |
@@ -1174,7 +1177,8 @@ call_timeout(struct rpc_task *task) | |||
1174 | task->tk_timeouts++; | 1177 | task->tk_timeouts++; |
1175 | 1178 | ||
1176 | if (RPC_IS_SOFT(task)) { | 1179 | if (RPC_IS_SOFT(task)) { |
1177 | printk(KERN_NOTICE "%s: server %s not responding, timed out\n", | 1180 | if (clnt->cl_chatty) |
1181 | printk(KERN_NOTICE "%s: server %s not responding, timed out\n", | ||
1178 | clnt->cl_protname, clnt->cl_server); | 1182 | clnt->cl_protname, clnt->cl_server); |
1179 | rpc_exit(task, -EIO); | 1183 | rpc_exit(task, -EIO); |
1180 | return; | 1184 | return; |
@@ -1182,7 +1186,8 @@ call_timeout(struct rpc_task *task) | |||
1182 | 1186 | ||
1183 | if (!(task->tk_flags & RPC_CALL_MAJORSEEN)) { | 1187 | if (!(task->tk_flags & RPC_CALL_MAJORSEEN)) { |
1184 | task->tk_flags |= RPC_CALL_MAJORSEEN; | 1188 | task->tk_flags |= RPC_CALL_MAJORSEEN; |
1185 | printk(KERN_NOTICE "%s: server %s not responding, still trying\n", | 1189 | if (clnt->cl_chatty) |
1190 | printk(KERN_NOTICE "%s: server %s not responding, still trying\n", | ||
1186 | clnt->cl_protname, clnt->cl_server); | 1191 | clnt->cl_protname, clnt->cl_server); |
1187 | } | 1192 | } |
1188 | rpc_force_rebind(clnt); | 1193 | rpc_force_rebind(clnt); |
@@ -1213,8 +1218,9 @@ call_decode(struct rpc_task *task) | |||
1213 | task->tk_pid, task->tk_status); | 1218 | task->tk_pid, task->tk_status); |
1214 | 1219 | ||
1215 | if (task->tk_flags & RPC_CALL_MAJORSEEN) { | 1220 | if (task->tk_flags & RPC_CALL_MAJORSEEN) { |
1216 | printk(KERN_NOTICE "%s: server %s OK\n", | 1221 | if (clnt->cl_chatty) |
1217 | clnt->cl_protname, clnt->cl_server); | 1222 | printk(KERN_NOTICE "%s: server %s OK\n", |
1223 | clnt->cl_protname, clnt->cl_server); | ||
1218 | task->tk_flags &= ~RPC_CALL_MAJORSEEN; | 1224 | task->tk_flags &= ~RPC_CALL_MAJORSEEN; |
1219 | } | 1225 | } |
1220 | 1226 | ||