Messages in this thread Patch in this message | | | Date | Tue, 5 Jan 1999 18:55:24 +0000 (GMT) | From | Dave Airlie <> | Subject | [patch] fixes for NFS over TCP (not fully fixed but helps) |
| |
Right, here are some patches to the sunrpc code in should apply against 2.2.0pre4, these patches allow NFS over TCP ro mounts to work a lot more resiliantly,
before these patches I could crash it with mount -t nfs -o tcp,nolock oak:/foo /foo cd /foo find . the find would stop and the rpc system would get stuck waiting for the tcp dispatcher to wake up (which it would never do)...
with these patches I can now do multiple finds and du and file reads with no problems, I'm looking into the file writing problem Alan mentioned now (whenever my flu goes away)....
the diff is in 3 parts, the first piece to linux/net/sunrpc/sched.c is most important, the next piece to xprt.c also seems to help as it ensures that the xprt is on the rpc_xprt_pending list before waking the tcp_dispatcher, and the fix to linux/include/linux/xprt.h just seems right to me ...
Comments anyone please test ..
Dave.
------------ David Airlie, David.Airlie@ul.ie,airlied@skynet-------- Telecommunications Research Centre, ECE Dept, University of Limerick \ http://www.csn.ul.ie/~airlied -- Telecommunications Researcher \ --- TEL: +353-61-202695 ----------------------------------------------- diff -ur linux/net/sunrpc/sched.c linux-dave/net/sunrpc/sched.c --- linux/net/sunrpc/sched.c Tue Jan 5 18:38:25 1999 +++ linux-dave/net/sunrpc/sched.c Tue Jan 5 18:44:54 1999 @@ -829,6 +829,10 @@ } save_flags(oldflags); cli(); if (!schedq.task) { + /* following two lines added by airlied@linux.ie + to make NFS over TCP work 5/1/99 */ + dprintk("RPC: rpciod running checking dispatch\n"); + rpciod_tcp_dispatcher(); dprintk("RPC: rpciod back to sleep\n"); interruptible_sleep_on(&rpciod_idle); dprintk("RPC: switch to rpciod\n"); diff -ur linux/net/sunrpc/xprt.c linux-dave/net/sunrpc/xprt.c --- linux/net/sunrpc/xprt.c Tue Dec 29 19:42:25 1998 +++ linux-dave/net/sunrpc/xprt.c Tue Jan 5 17:22:10 1999 @@ -821,12 +826,19 @@ */ if (!xprt->rx_pending_flag) { - dprintk("RPC: xprt queue\n"); + int start_queue=0; + + dprintk("RPC: xprt queue %p\n", rpc_xprt_pending); if(rpc_xprt_pending==NULL) - tcp_rpciod_queue(); + start_queue=1; xprt->rx_pending_flag=1; xprt->rx_pending=rpc_xprt_pending; rpc_xprt_pending=xprt; + if (start_queue) + { + tcp_rpciod_queue(); + start_queue=0; + } } else dprintk("RPC: xprt queued already %p\n", xprt); diff -ur linux/include/linux/sunrpc/xprt.h linux-dave/include/linux/sunrpc/xprt.h --- linux/include/linux/sunrpc/xprt.h Fri Jan 1 19:53:48 1999 +++ linux-dave/include/linux/sunrpc/xprt.h Mon Jan 4 21:51:30 1999 @@ -158,7 +158,7 @@ */ union { /* record marker & XID */ u32 header[2]; - u8 * data[8]; + u8 data[8]; } tcp_recm; struct rpc_rqst * tcp_rqstp; struct iovec tcp_iovec[MAX_IOVEC];
| |