Commit 55909f21 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Deprecate rpc_client->cl_protname

It just duplicates the cl_program->name, and is not used in any fast
paths where the extra dereference will cause a hit.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 2d9db750
...@@ -629,7 +629,7 @@ void rpc_shutdown_client(struct rpc_clnt *clnt) ...@@ -629,7 +629,7 @@ void rpc_shutdown_client(struct rpc_clnt *clnt)
might_sleep(); might_sleep();
dprintk_rcu("RPC: shutting down %s client for %s\n", dprintk_rcu("RPC: shutting down %s client for %s\n",
clnt->cl_protname, clnt->cl_program->name,
rcu_dereference(clnt->cl_xprt)->servername); rcu_dereference(clnt->cl_xprt)->servername);
while (!list_empty(&clnt->cl_tasks)) { while (!list_empty(&clnt->cl_tasks)) {
...@@ -649,7 +649,7 @@ static void ...@@ -649,7 +649,7 @@ static void
rpc_free_client(struct rpc_clnt *clnt) rpc_free_client(struct rpc_clnt *clnt)
{ {
dprintk_rcu("RPC: destroying %s client for %s\n", dprintk_rcu("RPC: destroying %s client for %s\n",
clnt->cl_protname, clnt->cl_program->name,
rcu_dereference(clnt->cl_xprt)->servername); rcu_dereference(clnt->cl_xprt)->servername);
if (clnt->cl_parent != clnt) if (clnt->cl_parent != clnt)
rpc_release_client(clnt->cl_parent); rpc_release_client(clnt->cl_parent);
...@@ -1299,7 +1299,7 @@ call_start(struct rpc_task *task) ...@@ -1299,7 +1299,7 @@ call_start(struct rpc_task *task)
struct rpc_clnt *clnt = task->tk_client; struct rpc_clnt *clnt = task->tk_client;
dprintk("RPC: %5u call_start %s%d proc %s (%s)\n", task->tk_pid, dprintk("RPC: %5u call_start %s%d proc %s (%s)\n", task->tk_pid,
clnt->cl_protname, clnt->cl_vers, clnt->cl_program->name, clnt->cl_vers,
rpc_proc_name(task), rpc_proc_name(task),
(RPC_IS_ASYNC(task) ? "async" : "sync")); (RPC_IS_ASYNC(task) ? "async" : "sync"));
...@@ -1908,7 +1908,7 @@ call_status(struct rpc_task *task) ...@@ -1908,7 +1908,7 @@ call_status(struct rpc_task *task)
default: default:
if (clnt->cl_chatty) if (clnt->cl_chatty)
printk("%s: RPC call returned error %d\n", printk("%s: RPC call returned error %d\n",
clnt->cl_protname, -status); clnt->cl_program->name, -status);
rpc_exit(task, status); rpc_exit(task, status);
} }
} }
...@@ -1939,7 +1939,7 @@ call_timeout(struct rpc_task *task) ...@@ -1939,7 +1939,7 @@ call_timeout(struct rpc_task *task)
if (clnt->cl_chatty) { if (clnt->cl_chatty) {
rcu_read_lock(); rcu_read_lock();
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_program->name,
rcu_dereference(clnt->cl_xprt)->servername); rcu_dereference(clnt->cl_xprt)->servername);
rcu_read_unlock(); rcu_read_unlock();
} }
...@@ -1955,7 +1955,7 @@ call_timeout(struct rpc_task *task) ...@@ -1955,7 +1955,7 @@ call_timeout(struct rpc_task *task)
if (clnt->cl_chatty) { if (clnt->cl_chatty) {
rcu_read_lock(); rcu_read_lock();
printk(KERN_NOTICE "%s: server %s not responding, still trying\n", printk(KERN_NOTICE "%s: server %s not responding, still trying\n",
clnt->cl_protname, clnt->cl_program->name,
rcu_dereference(clnt->cl_xprt)->servername); rcu_dereference(clnt->cl_xprt)->servername);
rcu_read_unlock(); rcu_read_unlock();
} }
...@@ -1990,7 +1990,7 @@ call_decode(struct rpc_task *task) ...@@ -1990,7 +1990,7 @@ call_decode(struct rpc_task *task)
if (clnt->cl_chatty) { if (clnt->cl_chatty) {
rcu_read_lock(); rcu_read_lock();
printk(KERN_NOTICE "%s: server %s OK\n", printk(KERN_NOTICE "%s: server %s OK\n",
clnt->cl_protname, clnt->cl_program->name,
rcu_dereference(clnt->cl_xprt)->servername); rcu_dereference(clnt->cl_xprt)->servername);
rcu_read_unlock(); rcu_read_unlock();
} }
...@@ -2015,7 +2015,7 @@ call_decode(struct rpc_task *task) ...@@ -2015,7 +2015,7 @@ call_decode(struct rpc_task *task)
goto out_retry; goto out_retry;
} }
dprintk("RPC: %s: too small RPC reply size (%d bytes)\n", dprintk("RPC: %s: too small RPC reply size (%d bytes)\n",
clnt->cl_protname, task->tk_status); clnt->cl_program->name, task->tk_status);
task->tk_action = call_timeout; task->tk_action = call_timeout;
goto out_retry; goto out_retry;
} }
...@@ -2287,7 +2287,7 @@ static void rpc_show_task(const struct rpc_clnt *clnt, ...@@ -2287,7 +2287,7 @@ static void rpc_show_task(const struct rpc_clnt *clnt,
printk(KERN_INFO "%5u %04x %6d %8p %8p %8ld %8p %sv%u %s a:%ps q:%s\n", printk(KERN_INFO "%5u %04x %6d %8p %8p %8ld %8p %sv%u %s a:%ps q:%s\n",
task->tk_pid, task->tk_flags, task->tk_status, task->tk_pid, task->tk_flags, task->tk_status,
clnt, task->tk_rqstp, task->tk_timeout, task->tk_ops, clnt, task->tk_rqstp, task->tk_timeout, task->tk_ops,
clnt->cl_protname, clnt->cl_vers, rpc_proc_name(task), clnt->cl_program->name, clnt->cl_vers, rpc_proc_name(task),
task->tk_action, rpc_waitq); task->tk_action, rpc_waitq);
} }
......
...@@ -409,7 +409,7 @@ rpc_show_info(struct seq_file *m, void *v) ...@@ -409,7 +409,7 @@ rpc_show_info(struct seq_file *m, void *v)
rcu_read_lock(); rcu_read_lock();
seq_printf(m, "RPC server: %s\n", seq_printf(m, "RPC server: %s\n",
rcu_dereference(clnt->cl_xprt)->servername); rcu_dereference(clnt->cl_xprt)->servername);
seq_printf(m, "service: %s (%d) version %d\n", clnt->cl_protname, seq_printf(m, "service: %s (%d) version %d\n", clnt->cl_program->name,
clnt->cl_prog, clnt->cl_vers); clnt->cl_prog, clnt->cl_vers);
seq_printf(m, "address: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_ADDR)); seq_printf(m, "address: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_ADDR));
seq_printf(m, "protocol: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_PROTO)); seq_printf(m, "protocol: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_PROTO));
......
...@@ -188,7 +188,7 @@ void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) ...@@ -188,7 +188,7 @@ void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt)
seq_printf(seq, "\tRPC iostats version: %s ", RPC_IOSTATS_VERS); seq_printf(seq, "\tRPC iostats version: %s ", RPC_IOSTATS_VERS);
seq_printf(seq, "p/v: %u/%u (%s)\n", seq_printf(seq, "p/v: %u/%u (%s)\n",
clnt->cl_prog, clnt->cl_vers, clnt->cl_protname); clnt->cl_prog, clnt->cl_vers, clnt->cl_program->name);
rcu_read_lock(); rcu_read_lock();
xprt = rcu_dereference(clnt->cl_xprt); xprt = rcu_dereference(clnt->cl_xprt);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment