Hard Drive Problems
15-Jul-90 22:15:32
Sb: #112984-Hard Drive Problems
Fm: Don Curtis/SYSOP 76703,4321
To: Roger Hand 73520,3506
Roger,
The book I used was the AmigaDOS manual, published by Bantam books,
written by Commodore.
There is no file header block list per-se. What there is, is the
root block since all filenames start at the root block of a filesystem.
The root block contains a list of header blocks for files/directories
attached directly to the root block of the filesystem. The file or
directory name is run thru a hashing algorithm and the result is an offset
within the root block. Located at that offset is the key number of the
block that contains a header block.
That header block can be either a file header, or a directory
header. If it's a file header, it contains pointers to what blocks the file
itself is using. If it's a directory header, it then acts like the root
block. It contains pointers (the key numbers) to files and/or directories
attached directly to that directory. Again a file or directory name would
be hashed, and offset generated and a jump to the keynumber at that offset
would be another header block…again, it could be either a file or
directory block.
Let's take the filename: df0:junk/downloads/files/george
The filesystem first "moves" to df0: and grabs the root block. It
then hashes the name "junk" and jumps to the header found at the hash
generated offset in the root block. It then hashes the name "downloads"
and jumps to the header found at the hash generated offset in the "junk"
directory block. The name "files" is now hashed, the offset located within
the "downloads" directory block and another jump is made. Finally,
"george" is hashed, the offset in the "files" directory is used to locate
the header block of the file "george". The system then reads the pointers
to the blocks containing "george" from that header, and starts to read them
in.
The above is a simplification of what goes on. There are extension
blocks for long files, extension blocks for hash offset collisions and so
forth. But it should give you a bit of a clue as to what's going on.
Don