[net.micro.cpm] How to mangle a disk.

DSullivan.CSC_SDO%hi-multics@sri-unix.UUCP (01/20/84)

It doesn't matter if you use reset all drives (function 13) or reset
drive (function 37) the following will muck up files/directories etc
given enough disk requests.
 Step 1) open a file on drive X
 Step 2) open file2 on drive X
 Step 3) write data to file x (less than 16k)
 Step 4) reset the disk. Both function 13 or 37 will do the trick.
 Step 5) write data to file2, the data will be written over file1's
        allocated area.
 Step 6) close the files, and make the damage perminant.
 What happens is the FCB for file1 is given blocks from the free pool
(as kept by the allocation vector)  The reset causes the vetor to be
re-initialized to the old pattern.  The writes to file2 then use the
re-initialized map, and re-allocate to the same space as file1.  These
two files now share a common set of blocks on the disk. Read/write
either and it will impact the data of the other.
 Please note when you have a hard disk, even less checking is done, so
it is easier to mangle the disk esp with BIOS that have disk cashes that
keep parts of directories around.

POURNE%mit-mc@sri-unix.UUCP (01/27/84)

From:  Jerry E. Pournelle <POURNE@mit-mc>

thanks; yet (and I have to rely on what others tell me for this)
I am told that using 13 is safe; I do know that we have done
what looks like what you describe with no bad consequences; the
BIOS checks for it.  One thing we do a lot is change disks while
fioles are in the text editor; this makes backup copies.  At one
time the system used to go to the A disk once, then stay with
the b; the double klunk was a bit slow, so Tony tried to
eliminate it by using 37; no disasters with us, but we did get a
hang conditin once.  He looked into it; then we installed the
program on MPM 8/16 systems, and there was a furious rewrite,
and now it klunks to the A disk, then to the logged on disk,
then the A gain, then writesd to the logged on. I ain't sure
what's happening, but it is completely bulletproof; not even
Alex can crash it and he can crash almost anything.
	It was then I was told that 37 could cause disasters,
and after I became sensitized to listen for fn 37 horror stories
I heard more; and now our wizards refuse to use 37; that is
about my last comment on the subject, since I am reporting what
others tell me, not what I really know.  I have tried to study
the documentation for those functions,a and they don't trell me
a lot.