From owner-freebsd-emulation@FreeBSD.ORG Wed Sep 19 13:25:50 2007 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F5D916A418 for ; Wed, 19 Sep 2007 13:25:50 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id CD10313C45A for ; Wed, 19 Sep 2007 13:25:49 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 00EB26679EF; Wed, 19 Sep 2007 15:25:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yMePatjc1K0n; Wed, 19 Sep 2007 15:25:47 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 0E1686679E6; Wed, 19 Sep 2007 15:25:47 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l8JDPkaS035695; Wed, 19 Sep 2007 15:25:46 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 19 Sep 2007 15:25:46 +0200 From: Roman Divacky To: Boris Samorodov Message-ID: <20070919132546.GA35553@freebsd.org> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75502368@srv.sem.ipt.ru> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org, sam Subject: Re: linuxolator problem on i386 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2007 13:25:50 -0000 > > @@ -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.. can you try buflen = min(nbytes, MAXBSIZE); and/or changing while (len > 0) { to while (len >= 0)4 {