Date: Thu, 4 Aug 2005 10:39:09 +0400 From: Andrey Chernov <ache@FreeBSD.ORG> To: Maxim.Sobolev@portaone.com, Dan Nelson <dnelson@allantgroup.com>, "current@freebsd.org" <current@FreeBSD.ORG> Subject: Re: Sub-optimal libc's read-ahead buffering behaviour Message-ID: <20050804063908.GA21871@nagual.pp.ru> In-Reply-To: <20050804060251.GA21228@nagual.pp.ru> References: <42F0CCD5.9090200@portaone.com> <20050803150117.GD93405@dan.emsphone.com> <42F0E9B2.9080208@portaone.com> <20050804060251.GA21228@nagual.pp.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 04, 2005 at 10:02:51AM +0400, Andrey Chernov wrote: > But between read & seek character device itself can move its pointer in > anyplace. Well, this phrase is incorrectly constructed. I mean: by reading from the character device, the pointer can be moved to same unpredictable places, say, become negative, or other overflow happens. So (considering changing content like /dev/mem too), any buferization is potentially dangerous here. fseek traditionally used as buferization break, in case, say, between fread and fwrite. In case SEEK_CUR still uses the buffer, it probably should not for character device. -- http://ache.pp.ru/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050804063908.GA21871>