lkml.org 
[lkml]   [1999]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: New kernel - netscape hangs
Alan Cox wrote:

> > > I see errors not hangs when mounting and trying to lock a partition with no
> > > lockds running and not mounted nolock
> >
> > You have to run Linux 2.2.1 kernel with my complete knfsd package. It hangs
> > inside lockd.
>
> Ok I'll run a test on that. But it should be using NFS timeouts IMHO, thats
> what BSD seems to do.

Which BSD?

>
> > > All the EPROTO changes etc in sunrpc. Are the unavoidable.
> >
> > It is necessary for lockd to detect that the daemon is not registered
> > on the NFS server.
>
> But its only part of the testing. You also need to handle ECONNREFUSED
> likewise to be consistent. An ECONNREFUSED means the portmap may have
> given a port but nobody was listening.

I am enclosing a new patch here.

H.J.

Index: net/sunrpc/pmap_clnt.c
===================================================================
RCS file: /local/work/cvs/linux/linux/net/sunrpc/pmap_clnt.c,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 pmap_clnt.c
--- pmap_clnt.c 1997/10/25 04:26:38 1.1.1.3
+++ pmap_clnt.c 1999/01/27 23:36:35
@@ -121,7 +121,7 @@ pmap_getport_done(struct rpc_task *task)
task->tk_action = NULL;
} else if (clnt->cl_port == 0) {
/* Program not registered */
- task->tk_status = -EACCES;
+ task->tk_status = -EPROTONOSUPPORT;
task->tk_action = NULL;
} else {
/* byte-swap port number first */
Index: fs/lockd/clntproc.c
===================================================================
RCS file: /local/work/cvs/linux/linux/fs/lockd/clntproc.c,v
retrieving revision 1.1.1.8
diff -u -p -r1.1.1.8 clntproc.c
--- clntproc.c 1999/01/27 00:29:00 1.1.1.8
+++ clntproc.c 1999/02/04 19:27:17
@@ -230,9 +230,18 @@ nlmclnt_call(struct nlm_rqst *req, u32 p
/* Perform the RPC call. If an error occurs, try again */
if ((status = rpc_call(clnt, proc, argp, resp, 0)) < 0) {
dprintk("lockd: rpc_call returned error %d\n", -status);
- if (status == -ERESTARTSYS)
+ switch (status) {
+ case -EPROTONOSUPPORT:
+ return -EINVAL;
+ case -ECONNREFUSED:
+ case -ETIMEDOUT:
+ case -ENOTCONN:
+ return -EAGAIN;
+ case -ERESTARTSYS:
return status;
+ default:
nlm_rebind_host(host);
+ }
} else
if (resp->status == NLM_LCK_DENIED_GRACE_PERIOD) {
dprintk("lockd: server in grace period\n");
\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.084 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site