Date: Fri, 17 Jul 2009 23:55:54 +0400 From: Anonymous <swell.k@gmail.com> To: Rick Macklem <rmacklem@uoguelph.ca> Cc: freebsd-current@freebsd.org Subject: Re: [newnfs/client] -alldirs: listing files consumes too much memory Message-ID: <86ws6713ud.fsf@gmail.com> In-Reply-To: <Pine.GSO.4.63.0907171525200.3849@muncher.cs.uoguelph.ca> (Rick Macklem's message of "Fri, 17 Jul 2009 15:30:43 -0400 (EDT)") References: <861vogcyp4.fsf@gmail.com> <Pine.GSO.4.63.0907171525200.3849@muncher.cs.uoguelph.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
Rick Macklem <rmacklem@uoguelph.ca> writes: > On Thu, 16 Jul 2009, Anonymous wrote: > >> Let's create 335 empty files in /blah and try to list them over nfsv3. >> >> # uname -vm >> FreeBSD 8.0-BETA1 #0: Sat Jul 4 03:55:14 UTC 2009 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >> >> # mkdir /blah >> # (while [ $((i+=1)) -le 334 ]; do : >/blah/foo_$i; done) >> # echo / -alldirs >/etc/exports >> # /etc/rc.d/nfsd onestart >> # mount -t newnfs -o nfsv3 0:/blah /mnt >> > Ok, I figured it out. I wasn't setting mp->mnt_stat.f_iosize before > getting the root vnode and, as such, getnewvnode() was setting > bo_bsize = 0. That confused getblk(), so it would always end up > returning block0, since it uses bo_bsize for a block calc. > > The patch follows, in case you're interested in testing it. > (I'll be queuing this patch up with re@ once I've tested it some more.) > > Thanks again for pointing the problem out, rick > -- patch for exp. nfs client -- [...] The patch fixed my problem. Tested on r195741M amd64.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ws6713ud.fsf>