Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Sep 2007 17:50:59 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        freebsd-emulation@freebsd.org, sam <samflanker@gmail.com>
Subject:   Re: linuxolator problem on i386
Message-ID:  <09429788@srv.sem.ipt.ru>
In-Reply-To: <20070919132546.GA35553@freebsd.org> (Roman Divacky's message of "Wed\, 19 Sep 2007 15\:25\:46 %2B0200")
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 19 Sep 2007 15:25:46 +0200 Roman Divacky wrote:

> > > @@ -442,8 +443,7 @@
> > 
> > >         off = fp->f_offset;
> > 
> > > -       buflen = max(LINUX_DIRBLKSIZ, nbytes);
> > > -       buflen = min(buflen, MAXBSIZE);             [1]
> > > +       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.

> I wonder why the limitation is there..

Seems that there is something that should keep this value not less
than LINUX_DIRBLKSIZ (or 512 bytes for now).

> can you try
>         buflen = min(nbytes, MAXBSIZE);

Actually, I don't see a reason. The code is clean to mee...
nbytes is always 4096 here and so do buflen (I did some printf's).

> and/or

> changing

>      while (len > 0) {

> to

>      while (len >= 0)4 {

?

WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve



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