[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Aargh! Goodbye HD...



Supertimer <supertimer@aol.com> wrote:

> PS. In the meantime, I've found that HFS volumes are more
> resistant to total failure.  For example, when the drive spins
> down and a write is made to a ProDOS volume, usually the
> Zip disk becomes inaccessable.  When this happened to one
> of my HFS disks, however, the volume could still be accessed
> but the file written to was damaged and could not be deleted.
> I was able to copy the files from the HFS volume to a new
> disk.  I think this is because HFS file info is not stored in a
> centralized block map like ProDOS file info.

It is almost exactly the other way around.

ProDOS file location information is stored as part of the file (the
index blocks), which can be scattered all over the disk along with the
data blocks for the file.  The only "centralised" information is the
directory (root directory is fixed location but subdirectories are
scattered) and volume bit map (free space).

An HFS volume has a volume free space bitmap similar to ProDOS, but the
directory and file location information for all files on the volume are
stored within two special files, called the catalog tree and extents
tree.  These are structured as B* trees (a sort of multi-way version of
a binary tree).

The catalog and extent tree files are preallocated to a reasonable size
when the volume is created, and can grow later.  They are usually the
first files on the disk, so they are adjacent to the directory header
and volume bitmap.

Another factor: HFS is supposed to have a backup copy of some of the
critical information at the end of the volume.  Assuming the IIgs HFS
FST complies with this, you won't lose everything if part of the catalog
tree gets overwritten, but some of the data in the backup may be out of
date.

Partitioning information is stored in exactly the same place for ProDOS
and HFS.


I suspect the problem here is that the ProDOS root directory gets
destroyed, causing everything on the disk to be lost, while the HFS
access only loses part of the catalog tree or extent tree, killing a
small number of files.  This probably depends on issues like the cache
utilization of the FSTs and the pattern and timing of write requests
they issue when updating a volume.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand