linuxolator problem on i386
Boris Samorodov
bsam at ipt.ru
Wed Sep 19 06:49:27 PDT 2007
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
More information about the freebsd-emulation
mailing list