Date: Thu, 20 Sep 2007 10:37:44 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: freebsd-emulation@freebsd.org, sam <samflanker@gmail.com> Subject: Re: linuxolator problem on i386 Message-ID: <20070920103744.sj5770y60wkcgsws@webmail.leidinger.net> In-Reply-To: <20070920101907.uxb5zxel8g00g4s0@webmail.leidinger.net> References: <46EF7E05.5040405@gmail.com> <20070918074332.GA30053@freebsd.org> <88000019@srv.sem.ipt.ru> <20070918082119.GA30932@freebsd.org> <89768331@srv.sem.ipt.ru> <41596338@srv.sem.ipt.ru> <20070919085405.GA24442@freebsd.org> <18395962@srv.sem.ipt.ru> <20070919111557.GA28377@freebsd.org> <75502368@srv.sem.ipt.ru> <20070919132546.GA35553@freebsd.org> <20070920101907.uxb5zxel8g00g4s0@webmail.leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Alexander Leidinger <Alexander@Leidinger.net> (from Thu, 20 Sep 2007 10:19:07 +0200): > Quoting Roman Divacky <rdivacky@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070920103744.sj5770y60wkcgsws>
