Date: Fri, 18 Apr 1997 11:11:30 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: ponds!rivers@dg-rtp.dg.com Cc: freebsd-bugs@freefall.freebsd.org Subject: Re: kern/3304: NFS V2 readdir hangs Message-ID: <199704180911.LAA08276@labinfo.iet.unipi.it> In-Reply-To: <199704180230.TAA25674@freefall.freebsd.org> from "Thomas David Rivers" at Apr 17, 97 07:29:45 pm
next in thread | previous in thread | raw e-mail | index | archive | help
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. Can someone (Dave ?) try the above fix and see if it works ? Thanks Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704180911.LAA08276>