[net.unix] Raw tape buffer vs record size

54394gt@hocda.UUCP (01/17/84)

On our systems on a PDP-11/45 (USG 2.0, then later 4.2), a raw tape read (TU10)
always returns the number of bytes on the tape record if that is less than
or equal to the buffer size.  It never overruns the buffer.  I have tried
all combinations of record size and buffer size.  Both must be even.

guy@rlgvax.UUCP (Guy Harris) (01/18/84)

The most likely reason why the buffer size and address must be even when
reading from tapes is that "physio" is too dumb to realize that tape
controllers can be given an odd byte count or address.  RSX-11M's tape
drivers don't complain; why should UNIX's?  (There is a B_TAPE bit lying
around in the I/O queue header or somesuch place (depending on the flavor of
UNIX you're running) which can be used for this.  Or, if that jams something,
add an extra argument to "physio".)

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy

smh@mit-eddie.UUCP (Steven M. Haflich) (01/22/84)

Guy Harris says:
	The most likely reason why the buffer size and address must be
	even when reading from tapes is that "physio" is too dumb to
	realize that tape controllers can be given an odd byte count or
	address.
Long ago, for a very good reason which I can no longer remember, we
hacked a PDP11 V7 tm.c to permit raw device reads and writes with odd
blocksize.  It worked like a charm, and at the time, we were satisfied
that the change would be completely upward compatible.  I don't
remember the exact source changes, but they were indeed simple.