diff options
-rw-r--r-- | net/sunrpc/clnt.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7964a98c90e5..0530eea37b59 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/kallsyms.h> | ||
28 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
29 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
30 | #include <linux/smp_lock.h> | 31 | #include <linux/smp_lock.h> |
@@ -1528,29 +1529,31 @@ EXPORT_SYMBOL_GPL(rpc_call_null); | |||
1528 | #ifdef RPC_DEBUG | 1529 | #ifdef RPC_DEBUG |
1529 | static void rpc_show_header(void) | 1530 | static void rpc_show_header(void) |
1530 | { | 1531 | { |
1531 | printk(KERN_INFO "-pid- proc flgs status -client- -prog- --rqstp- " | 1532 | printk(KERN_INFO "-pid- flgs status -client- --rqstp- " |
1532 | "-timeout -rpcwait -action- ---ops--\n"); | 1533 | "-timeout ---ops--\n"); |
1533 | } | 1534 | } |
1534 | 1535 | ||
1535 | static void rpc_show_task(const struct rpc_clnt *clnt, | 1536 | static void rpc_show_task(const struct rpc_clnt *clnt, |
1536 | const struct rpc_task *task) | 1537 | const struct rpc_task *task) |
1537 | { | 1538 | { |
1538 | const char *rpc_waitq = "none"; | 1539 | const char *rpc_waitq = "none"; |
1539 | int proc = -1; | 1540 | char *p, action[KSYM_SYMBOL_LEN]; |
1540 | |||
1541 | if (task->tk_msg.rpc_proc) | ||
1542 | proc = task->tk_msg.rpc_proc->p_proc; | ||
1543 | 1541 | ||
1544 | if (RPC_IS_QUEUED(task)) | 1542 | if (RPC_IS_QUEUED(task)) |
1545 | rpc_waitq = rpc_qname(task->tk_waitqueue); | 1543 | rpc_waitq = rpc_qname(task->tk_waitqueue); |
1546 | 1544 | ||
1547 | printk(KERN_INFO "%5u %04d %04x %6d %8p %6d %8p %8ld %8s %8p %8p\n", | 1545 | /* map tk_action pointer to a function name; then trim off |
1548 | task->tk_pid, proc, | 1546 | * the "+0x0 [sunrpc]" */ |
1549 | task->tk_flags, task->tk_status, | 1547 | sprint_symbol(action, (unsigned long)task->tk_action); |
1550 | clnt, clnt->cl_prog, | 1548 | p = strchr(action, '+'); |
1551 | task->tk_rqstp, task->tk_timeout, | 1549 | if (p) |
1552 | rpc_waitq, | 1550 | *p = '\0'; |
1553 | task->tk_action, task->tk_ops); | 1551 | |
1552 | printk(KERN_INFO "%5u %04x %6d %8p %8p %8ld %8p %sv%u %s a:%s q:%s\n", | ||
1553 | task->tk_pid, task->tk_flags, task->tk_status, | ||
1554 | clnt, task->tk_rqstp, task->tk_timeout, task->tk_ops, | ||
1555 | clnt->cl_protname, clnt->cl_vers, rpc_proc_name(task), | ||
1556 | action, rpc_waitq); | ||
1554 | } | 1557 | } |
1555 | 1558 | ||
1556 | void rpc_show_tasks(void) | 1559 | void rpc_show_tasks(void) |