Record-access libraries (with query on NFS)

Stephen J. Friedl friedl at vsi.COM
Sat Oct 15 00:42:09 AEST 1988


In article <10467 at tekecs.TEK.COM>, andrew at frip.gwd.tek.com (Andrew Klossner) writes:
> Yes.  But note: a raw disk does NOT support a byte stream model (at
> least under Berkeley).  It implements a block model only.  An
> application that tries to do a read(2) or write(2) beginning with a
> byte that does not begin a block will find that its lseek pointer is
> rounded down to the beginning of the block.  This burned some
> application writers here.

In addition, sometimes you'll get the *whole block* even if you request
just a couple of bytes.  We got burned by it by moving some code from
the 3B2 (allows byte-at-a-time raw reads) to another machine that didn't.
We found lots of memory getting trashed, and (vague recollection here)
the return value from read(2) indicated that the requested amount had
been read, not the whole block.

-- 
Steve Friedl    V-Systems, Inc.  +1 714 545 6442    3B2-kind-of-guy
friedl at vsi.com     {backbones}!vsi.com!friedl    attmail!vsi!friedl
---------Nancy Reagan on the Three Stooges: "Just say Moe"---------



More information about the Comp.unix.wizards mailing list