Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Apr 1997 06:48:17 -0400 (EDT)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!labinfo.iet.unipi.it!luigi, ponds!lakes.water.net!rivers
Cc:        ponds!freefall.freebsd.org!freebsd-bugs
Subject:   Re: kern/3304: NFS V2 readdir hangs
Message-ID:  <199704181048.GAA07390@lakes.water.net>

next in thread | raw e-mail | index | archive | help
Luigi Rizzo writes:
> 
> Hi,
> 
> I followed the interesting (and very detailed) analysis of the NFS
> problem (PR kern/3304), and I have a possible patch.
> 
> looking at nfs_rcvlock() is implemented, I notice that the only way to
> return EALREADY is to have rep->r_mrep != NULL
> 
> The variable comes (via nfs_reply() ) from nfs_request() where the code
> is something like the following (I have reported only a few relevant
> lines, from a 2.2.1-R system:
> 
>     $Id: nfs_socket.c,v 1.18 1996/10/11 10:15:33 dfr Exp $
> 
> 
>  923:	tryagain:
>  ...
>  933:		rep->r_mrep = NULL;
>  ...
>  979:			error = nfs_reply(rep);
>  ...
> 1064:                                goto tryagain;
> 
> the problem is, r_mrep seems only to be set to something != NULL in
> nfs_reply(). While I don't understand the code very well, it seems
> to me that the initialization in line 933 should be moved outside
> the retry loop, before line 923. Otherwise the locking cannot possibly
> work because repeated calls to nfs_reply() use the same parameters.

 Well - what good eyes you have :-)  I didn't notice that...


> 
> Can someone (Dave ?) try the above fix and see if it works ?

 I'll give it a try later this morning (my time, EST ) and let you know.

	- Dave Rivers -




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704181048.GAA07390>