Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101906
b: refs/heads/master
c: 38e886e
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jul 9, 2008
1 parent 6354eee commit 1c0b770
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68a23ee94e3a06819f5a39d64f2e1f3131bab12d
refs/heads/master: 38e886e0c18975543938519254fc9bf0829c75a3
46 changes: 24 additions & 22 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1532,40 +1532,42 @@ static void rpc_show_header(void)
"-timeout -rpcwait -action- ---ops--\n");
}

static void rpc_show_task(const struct rpc_clnt *clnt,
const struct rpc_task *task)
{
const char *rpc_waitq = "none";
int proc = -1;

if (task->tk_msg.rpc_proc)
proc = task->tk_msg.rpc_proc->p_proc;

if (RPC_IS_QUEUED(task))
rpc_waitq = rpc_qname(task->tk_waitqueue);

printk(KERN_INFO "%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p\n",
task->tk_pid, proc,
task->tk_flags, task->tk_status,
clnt, clnt->cl_prog,
task->tk_rqstp, task->tk_timeout,
rpc_waitq,
task->tk_action, task->tk_ops);
}

void rpc_show_tasks(void)
{
struct rpc_clnt *clnt;
struct rpc_task *t;
struct rpc_task *task;
int header = 0;

spin_lock(&rpc_client_lock);
list_for_each_entry(clnt, &all_clients, cl_clients) {
spin_lock(&clnt->cl_lock);
list_for_each_entry(t, &clnt->cl_tasks, tk_task) {
const char *rpc_waitq = "none";
int proc;

list_for_each_entry(task, &clnt->cl_tasks, tk_task) {
if (!header) {
rpc_show_header();
header++;
}

if (t->tk_msg.rpc_proc)
proc = t->tk_msg.rpc_proc->p_proc;
else
proc = -1;

if (RPC_IS_QUEUED(t))
rpc_waitq = rpc_qname(t->tk_waitqueue);

printk("%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p\n",
t->tk_pid, proc,
t->tk_flags, t->tk_status,
t->tk_client,
(t->tk_client ? t->tk_client->cl_prog : 0),
t->tk_rqstp, t->tk_timeout,
rpc_waitq,
t->tk_action, t->tk_ops);
rpc_show_task(clnt, task);
}
spin_unlock(&clnt->cl_lock);
}
Expand Down

0 comments on commit 1c0b770

Please sign in to comment.