diff options
-rw-r--r-- | fs/nfsd/nfs4callback.c | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/clnt.h | 4 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 16 |
3 files changed, 15 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 4d4760e687c3..702fa577aa6e 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -381,7 +381,7 @@ static int do_probe_callback(void *data) | |||
381 | .program = &cb_program, | 381 | .program = &cb_program, |
382 | .version = nfs_cb_version[1]->number, | 382 | .version = nfs_cb_version[1]->number, |
383 | .authflavor = RPC_AUTH_UNIX, /* XXX: need AUTH_GSS... */ | 383 | .authflavor = RPC_AUTH_UNIX, /* XXX: need AUTH_GSS... */ |
384 | .flags = (RPC_CLNT_CREATE_NOPING), | 384 | .flags = (RPC_CLNT_CREATE_NOPING | RPC_CLNT_CREATE_QUIET), |
385 | }; | 385 | }; |
386 | struct rpc_message msg = { | 386 | struct rpc_message msg = { |
387 | .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL], | 387 | .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL], |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 6fff7f82ef12..764fd4c286e0 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -42,7 +42,8 @@ struct rpc_clnt { | |||
42 | 42 | ||
43 | unsigned int cl_softrtry : 1,/* soft timeouts */ | 43 | unsigned int cl_softrtry : 1,/* soft timeouts */ |
44 | cl_discrtry : 1,/* disconnect before retry */ | 44 | cl_discrtry : 1,/* disconnect before retry */ |
45 | cl_autobind : 1;/* use getport() */ | 45 | cl_autobind : 1,/* use getport() */ |
46 | cl_chatty : 1;/* be verbose */ | ||
46 | 47 | ||
47 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ | 48 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ |
48 | const struct rpc_timeout *cl_timeout; /* Timeout strategy */ | 49 | const struct rpc_timeout *cl_timeout; /* Timeout strategy */ |
@@ -114,6 +115,7 @@ struct rpc_create_args { | |||
114 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 3) | 115 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 3) |
115 | #define RPC_CLNT_CREATE_NOPING (1UL << 4) | 116 | #define RPC_CLNT_CREATE_NOPING (1UL << 4) |
116 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 5) | 117 | #define RPC_CLNT_CREATE_DISCRTRY (1UL << 5) |
118 | #define RPC_CLNT_CREATE_QUIET (1UL << 6) | ||
117 | 119 | ||
118 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | 120 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); |
119 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 121 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
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 | ||