[net.bugs.v7] BIG BUG in V7 dump!!!!!

smh@mit-eddi.UUCP (05/14/83)

If you make disk backups using dump on v7, be careful --
depending on your magtape driver, you may be in BIG trouble.
Everyone knows how casual Unix programs are about checking
for error returns on reads and writes, since they are so
rare.  However, one would expect the system filesystem backup
program to be more careful.  Sigh!

Look in your dump sources for the tape write statement.  (I don't
have sources in front of me right now.)  There is only one,
and it looks something like:
	write(to,...,LEN);
If that's all you see, change it to something like:
	if (write(to,...,LEN)!=LEN) {
		fprintf(stderr, "DUMP: Hard io error on write\n");
		exit(-1);
	}
You'll be glad you did.  The V7 mt magtape driver is weak on error
retry, especially at the BOT, where it repeatedly does a REWIND
instead of a BSR before WIRG.  If you spot check your dump tapes,
you may be surprised how many you can't read!
(The BOT error on write problem can be fixed by having the seek
code in the driver which uses a REW instead of BSR if (blkno==0)
use a BSR regardless if (errcnt>2), or some such.
					Steve Haflich
					MIT-EMS
					gendar!mit-eddie!smh
					(617)253-7441