AmigaActive (750/1525)

From:Don Cox
Date:14 Sep 2000 at 19:54:32
Subject:Re: SEAL-O-RAMA

On 14-Sep-00, Andrew Crowe wrote:

> I think any files open in output mode, even if at the time nothings
> being written to them, it'd devalidate.
>
> Actually, lets have a quick test...
>
> /Me loads up Basic
>
> Open out 1,"Workbench:Test"
> Print #1,"Hello World"
>
> /Me turns power off.
>
>
>
> Oh, everything still works, well I'm not complaining :) (I'm sure I
> had a devalidation once when I had a file open like that and it
> crashed, guess it must have been writing to it)

It doesn't have anything to do with the file being open, except that the
file must be open if it's being written.

The sequence is,
1. mark bitmap as invalid
2. write some sectors
3. update bitmap
4. mark bitmap as valid

If a crash occurs during this sequence, the bitmap is invalid and has to
be redrawn by examining the tree of directories and files on the
partition. This can take an annoyingly long time now that disks are so
big. It wasn't a problem in the 1980s when drives were smaller.

If the crash occurs while the sectors are being written, the file tree
may not be logical, and then you need a repair utility.

Regards



Don Cox
doncox@enterprise.net

Quote carefully and read all ADMIN:README mails