Messages in this thread Patch in this message | | | Date | Sun, 18 Jan 1998 14:35:19 -0500 | From | Bill Hawes <> | Subject | sunrpc debugging patch |
| |
Oops, wrong patch attached. Hopefully I got this one right ...
Regards, Bill--- net/sunrpc/sched.c.old Tue Jan 13 10:38:39 1998 +++ net/sunrpc/sched.c Sun Jan 18 14:25:55 1998 @@ -46,6 +46,11 @@ static struct rpc_wait_queue childq = RPC_INIT_WAITQ("childq"); /* + * RPC tasks sit here while waiting for conditions to improve. + */ +static struct rpc_wait_queue delay_queue = RPC_INIT_WAITQ("delayq"); + +/* * All RPC tasks are linked into this list */ static struct rpc_task * all_tasks = NULL; @@ -318,8 +323,6 @@ void rpc_delay(struct rpc_task *task, unsigned long delay) { - static struct rpc_wait_queue delay_queue; - task->tk_timeout = delay; rpc_sleep_on(&delay_queue, task, NULL, __rpc_atrun); } @@ -712,6 +720,7 @@ save_flags(oldflags); cli(); rpc_make_runnable(child); restore_flags(oldflags); + /* N.B. Is it possible for the child to have already finished? */ rpc_sleep_on(&childq, task, func, NULL); } @@ -917,14 +927,16 @@ if (!t) return; - printk("-pid- proc flgs status -client- --rqstp- -timeout " + printk("-pid- proc flgs status -client- -prog- --rqstp- -timeout " "-rpcwait -action- --exit--\n"); for (; t; t = next) { next = t->tk_next_task; - printk("%05d %04d %04x %06d %8p %8p %08ld %8p %8p %8p\n", + printk("%05d %04d %04x %06d %8p %6d %8p %08ld %8s %8p %8p\n", t->tk_pid, t->tk_proc, t->tk_flags, t->tk_status, - t->tk_client, t->tk_rqstp, t->tk_timeout, - t->tk_rpcwait, t->tk_action, t->tk_exit); + t->tk_client, t->tk_client->cl_prog, + t->tk_rqstp, t->tk_timeout, + t->tk_rpcwait ? rpc_qname(t->tk_rpcwait) : " <NULL> ", + t->tk_action, t->tk_exit); if (!(t->tk_flags & RPC_TASK_NFSWRITE)) continue; | |