Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Apr 1997 15:43:07 -0400 (EDT)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!nlsystems.com!dfr, ponds!lakes.water.net!rivers
Cc:        ponds!freebsd.org!freebsd-bugs
Subject:   Re: kern/3304: NFS V2 readdir hangs
Message-ID:  <199704221943.PAA04688@lakes.water.net>

next in thread | raw e-mail | index | archive | help
Doug Rabson writes:
> >  Now, I see you set the rcvreserve to "(nm_rsize + NFS_MAXPKTHDR) * 2"
> > which, for me was enough - but can we determine just what is 'really'
> > enough, or is this just a better guess?  [Is it guaranteed to be
> > enough because you bump the readdirsize down to the rsize is rsize 
> > is the lesser of the two?]
> 
> In the existing code, the main problem I can see is that nm_readdirsize is
> allowed to be larger than nm_rsize and indeed is forced to be a minimum of
> 4k for some spurious reason.  This would mean that if you set nm_rsize to
> 1024, you would be guaranteed a hang for the first readdir larger than
> about 1200 bytes.  

  Ahh - I see... the socket buf was much smaller (because it's based
on rsize) than the readdirsize...

>                    Did your hang happen with or without -r1024, or both?

  It definately happened with -r1024 - I don't believe I tried it without
a -r1024.  


> 
> I still don't quite understand the rules used by the socketbuf for these
> sizes.  It may be that just forcing nm_readdirsize <= nm_rsize is enough.
> I doubled the size to make it the same as the SEQPACKET and STREAM case; I
> don't think it will do any harm to leave it doubled.

 Ok - that sounds reasonable.   I was wondering if we could deduce
that doubled will always be adequate...

 Here's another question - I thought -I on mount_nfs was supposed to
set the readdirsize... if not, should there be an option on mount_nfs
that lets you set this?   Such an option could be handy if we run
into a similar problem in the future...

	- Dave Rivers -




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