Skip to content

Commit

Permalink
SUNRPC: get rid of cl_chatty
Browse files Browse the repository at this point in the history
 Clean up: Every ULP that uses the in-kernel RPC client, except the NLM
 client, sets cl_chatty.  There's no reason why NLM shouldn't set it, so
 just get rid of cl_chatty and always be verbose.

 Test-plan:
 Compile with CONFIG_NFS enabled.

 Signed-off-by: Chuck Lever <cel@netapp.com>
 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jan 6, 2006
1 parent 9220041 commit f518e35
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 15 deletions.
3 changes: 1 addition & 2 deletions fs/lockd/clntproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ nlmclnt_proc(struct inode *inode, int cmd, struct file_lock *fl)
goto done;
}
clnt->cl_softrtry = nfssrv->client->cl_softrtry;
clnt->cl_intr = nfssrv->client->cl_intr;
clnt->cl_chatty = nfssrv->client->cl_chatty;
clnt->cl_intr = nfssrv->client->cl_intr;
}

/* Keep the old signal mask */
Expand Down
1 change: 0 additions & 1 deletion fs/lockd/mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ nsm_create(void)
if (IS_ERR(clnt))
goto out_err;
clnt->cl_softrtry = 1;
clnt->cl_chatty = 1;
clnt->cl_oneshot = 1;
return clnt;

Expand Down
2 changes: 0 additions & 2 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,6 @@ nfs_create_client(struct nfs_server *server, const struct nfs_mount_data *data)

clnt->cl_intr = 1;
clnt->cl_softrtry = 1;
clnt->cl_chatty = 1;

return clnt;

Expand Down Expand Up @@ -1838,7 +1837,6 @@ static int nfs4_fill_super(struct super_block *sb, struct nfs4_mount_data *data,
}
clnt->cl_intr = 1;
clnt->cl_softrtry = 1;
clnt->cl_chatty = 1;
clp->cl_rpcclient = clnt;
memcpy(clp->cl_ipaddr, server->ip_addr, sizeof(clp->cl_ipaddr));
nfs_idmap_new(clp);
Expand Down
1 change: 0 additions & 1 deletion fs/nfs/mount_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version,
RPC_AUTH_UNIX);
if (!IS_ERR(clnt)) {
clnt->cl_softrtry = 1;
clnt->cl_chatty = 1;
clnt->cl_oneshot = 1;
clnt->cl_intr = 1;
}
Expand Down
1 change: 0 additions & 1 deletion fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ nfsd4_probe_callback(struct nfs4_client *clp)
}
clnt->cl_intr = 0;
clnt->cl_softrtry = 1;
clnt->cl_chatty = 1;

/* Kick rpciod, put the call on the wire. */

Expand Down
1 change: 0 additions & 1 deletion include/linux/sunrpc/clnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ struct rpc_clnt {

unsigned int cl_softrtry : 1,/* soft timeouts */
cl_intr : 1,/* interruptible */
cl_chatty : 1,/* be verbose */
cl_autobind : 1,/* use getport() */
cl_oneshot : 1,/* dispose after use */
cl_dead : 1;/* abandoned */
Expand Down
10 changes: 4 additions & 6 deletions net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,7 @@ call_status(struct rpc_task *task)
rpc_exit(task, status);
break;
default:
if (clnt->cl_chatty)
printk("%s: RPC call returned error %d\n",
printk("%s: RPC call returned error %d\n",
clnt->cl_protname, -status);
rpc_exit(task, status);
break;
Expand Down Expand Up @@ -993,14 +992,13 @@ call_timeout(struct rpc_task *task)

dprintk("RPC: %4d call_timeout (major)\n", task->tk_pid);
if (RPC_IS_SOFT(task)) {
if (clnt->cl_chatty)
printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
printk(KERN_NOTICE "%s: server %s not responding, timed out\n",
clnt->cl_protname, clnt->cl_server);
rpc_exit(task, -EIO);
return;
}

if (clnt->cl_chatty && !(task->tk_flags & RPC_CALL_MAJORSEEN)) {
if (!(task->tk_flags & RPC_CALL_MAJORSEEN)) {
task->tk_flags |= RPC_CALL_MAJORSEEN;
printk(KERN_NOTICE "%s: server %s not responding, still trying\n",
clnt->cl_protname, clnt->cl_server);
Expand All @@ -1027,7 +1025,7 @@ call_decode(struct rpc_task *task)
dprintk("RPC: %4d call_decode (status %d)\n",
task->tk_pid, task->tk_status);

if (clnt->cl_chatty && (task->tk_flags & RPC_CALL_MAJORSEEN)) {
if (task->tk_flags & RPC_CALL_MAJORSEEN) {
printk(KERN_NOTICE "%s: server %s OK\n",
clnt->cl_protname, clnt->cl_server);
task->tk_flags &= ~RPC_CALL_MAJORSEEN;
Expand Down
1 change: 0 additions & 1 deletion net/sunrpc/pmap_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ pmap_create(char *hostname, struct sockaddr_in *srvaddr, int proto, int privileg
RPC_AUTH_UNIX);
if (!IS_ERR(clnt)) {
clnt->cl_softrtry = 1;
clnt->cl_chatty = 1;
clnt->cl_oneshot = 1;
}
return clnt;
Expand Down

0 comments on commit f518e35

Please sign in to comment.