Re: [newnfs/client] -alldirs: listing files consumes too much memory

From: Anonymous <swell.k_at_gmail.com>
Date: Fri, 17 Jul 2009 23:55:54 +0400
Rick Macklem <rmacklem_at_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_at_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_at_ 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.
Received on Fri Jul 17 2009 - 17:56:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:52 UTC