patch for 2.1.79 sunrpc task debugging

Bill Hawes (whawes@star.net)
Sun, 18 Jan 1998 14:24:14 -0500


This is a multi-part message in MIME format.
--------------24A2A801A3DABEE051B544EA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The attached patch makes some improvements in the RPC task list display
code. It adds an extra field, the client cl_prog value, and decodes the
tk_rpcwait value into a text string for the various wait queues.

Regards,
Bill
--------------24A2A801A3DABEE051B544EA
Content-Type: text/plain; charset=us-ascii; name="sunrpc_79-patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="sunrpc_79-patch"

--- linux-2.1.79/net/sunrpc/sched.c.old Tue Jan 13 10:38:39 1998
+++ linux-2.1.79/net/sunrpc/sched.c Fri Jan 16 23:04:03 1998
@@ -440,10 +440,15 @@
static int executing = 0;
int incr = RPC_IS_ASYNC(task)? 1 : 0;

- if (incr && (executing || rpc_inhibit)) {
- printk("RPC: rpc_execute called recursively!\n");
- return;
+ if (incr) {
+ if (rpc_inhibit) {
+ printk("RPC: execution inhibited!\n");
+ return;
+ }
+ if (executing)
+ printk("RPC: %d tasks executed\n", executing);
}
+
executing += incr;
__rpc_execute(task);
executing -= incr;
@@ -725,6 +730,7 @@
struct rpc_task **q, *rovr;

dprintk("RPC: killing all tasks for client %p\n", clnt);
+ /* N.B. Why bother to inhibit? Nothing blocks here ... */
rpc_inhibit++;
for (q = &all_tasks; (rovr = *q); q = &rovr->tk_next_task) {
if (!clnt || rovr->tk_client == clnt) {

--------------24A2A801A3DABEE051B544EA--