[comp.sys.amiga.tech] async copier -- GURU 87000008: AmigaDOS - Key Already Free

deven@rpi.edu (Deven T. Corzine) (04/13/90)

The nastiest problem I've run into with this async copier is when I
leave the source disk unprotected during the copy, sometimes one of
the files I was working on (such as the backup file of the source to
the copier or the object file) somehow gets corrupted in such a way
that if I try to remove the file, AmigaDOS GURUs the machine with
Alert #87000008, Key Already Free.

Now, I assume this means that one of the blocks in this file was
already marked as free or some such, or perhaps the directory entry
was thought deleted or some such.  (or is it something else?)  If so,
then why doesn't AmigaDOS just ignore it or bring up a warning
requester, and leave it marked free?!?  I can't delete a file because
AmigaDOS thinks it's corrupted and perhaps incomplete?  I don't care!
If I wanted the file I wouldn't be deleting it!  *sigh*

So when this happens, I'm stuck with formatting a new disk, copying
all of the several hundred files over to it (the corrupt file copies
fine!) and diskcopying it all back.  Needless to say, this is quite
annoying, since the process takes 15-20 minutes.

Now, according to the program logic, it doesn't look like it should be
possible for it to be sending a write request to the source drive, and
it isn't just trashing a track or any such.  Just AmigaDOS gets
corrupted somehow.  Maybe I missed something in the program that let
it somehow write to the disk, but I can't imagine how.  Assuming
checking the protection status doesn't write to the disk (questionable
assumption), then I have a hard time finding a possible flow of
control that would allow a write to the source drive to occur.

Is it possible that AmigaDOS has somehow not updated some data
structure on the disk before I sent the ACTION_INHIBIT packet to the
device handler?  I'm not sure if this bug ever occurred when I ran the
copy program from the ramdisk.  But it did happen at least 3 or 4
times when I was testing it running from the disk I was copying from.
If anyone has any ideas, please let me know.  (Randell, you out there?
AmigaDOS internals are right up your alley, aren't they?  help!)

Deven
-- 
Deven T. Corzine        Internet:  deven@rpi.edu, shadow@pawl.rpi.edu
Snail:  2151 12th St. Apt. 4, Troy, NY 12180   Phone:  (518) 274-0327
Bitnet:  deven@rpitsmts, userfxb6@rpitsmts     UUCP:  uunet!rpi!deven
Simple things should be simple and complex things should be possible.