[comp.unix.ultrix] Mag tape i/o under Ultrix

art@dinorah.wustl.edu (Arthur B. Smith) (10/06/89)

Hello, I hope this isn't "old" news -- I've only been watching these
groups for a few months, and sometimes miss a week here or there.  Has
anyone noticed that mag tape io (mtio(4)) is a giant step backwards 
from BSD 4.3 (or even BSD 4.1, for that matter) in that reads of 
partial records (e.g., byte at a time i/o) and any kinds of lseeks 
don't work?  Is there a reason for this?

The real beauty of UNIX (is a registered trademark of ATT Bell
Laboratories so I don't get a letter ;-) is (in part) that ALL i/o
uses the same system calls (open, close, read, write, lseek) whether
it is to a file, a process, or a device, and that these calls behave
identically whenever possible.  Obviously you can't seek a process.
You can however read a tape a byte at a time (sure it's inefficient,
but that's why the driver should buffer!), and you can seek a tape.
The mag tape device driver under Ultrix is, at best, incomplete, it
seems to me.

If the reason for this is efficiency (keeping streaming tapes
streaming), there should be two interfaces (available as two special
files for the tape -- ample precedent for that), one which is lean and
fast, and the other which may be slow but is fully functional.  I, for
one, miss the generality.  Does anyone else?

		-art smith	(art@dinorah.wustl.edu   or
				 ...!uunet!wucs1!dinorah!art)

P.S., Yes, I did fill out an SPR on this.  In a year I'll get a "thank
you for your suggestion, we will take it under advisement" letter.