linuxolator problem on i386

Alexander Leidinger Alexander at Leidinger.net
Thu Sep 20 01:38:18 PDT 2007


Quoting Alexander Leidinger <Alexander at Leidinger.net> (from Thu, 20  
Sep 2007 10:19:07 +0200):

> Quoting Roman Divacky <rdivacky at freebsd.org> (from Wed, 19 Sep 2007
> 15:25:46 +0200):
>
>>>> @@ -442,8 +443,7 @@
>>>
>>>>         off = fp->f_offset;
>>>
>>>> -       buflen = max(LINUX_DIRBLKSIZ, nbytes);
>>>> -       buflen = min(buflen, MAXBSIZE);
>>>> +       buflen = max(buflen, MAXBSIZE);
>>>>         buf = malloc(buflen, M_TEMP, M_WAITOK);
>>>>         vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
>>>
>>> No. It limits buflen to which is smaller, buflen or MAXBSIZE.
>>
>> yes... brain does not work real good today :(
>>
>> I wonder why the limitation is there.
>
> Isn't this the code where we made sure that we don't use more buffer
> than we have? In some part of the code we specially made sure that we
> don't overflow either the FreeBSD size nor the linux size.

To answer myself... this isn't this node. I had a look at the  
annotated view in cvsweb and it was changed by marcel in rev. 1.55:  
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/compat/linux/linux_file.c.diff?r1=1.54;r2=1.55;f=h

He copied this from the previous revision and changed it from  
DIRBLKSIZ to LINUX_DIRBLKSIZ.

I suggest to dig deeper into the history via the annotated view of the  
corresponding revisions to see if a commit log contains the rationale  
for this.

If not try to understand what the code is supposed to be and change it  
accordingly.

Bye,
Alexander.

-- 
Monogamy is the Western custom of one wife and hardly any mistresses.
		-- H. H. Munro

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137


More information about the freebsd-emulation mailing list