-
Notifications
You must be signed in to change notification settings - Fork 9
File structure
benhj edited this page Apr 27, 2014
·
2 revisions
A file is composed of blocks linked together in the manner of a linked list:
Although the above example shows a contiguous arrangement, any block can point to any other block in practice.
- The number of blocks indicates the size of the TeaSafe image.
- Blocks are allocated on a first come first serve basis.
- Allocation is represented by a volume bitmap located near the start of the file system.
- For allocated file block 45 (I've just chosen this one at random), bit 45 in the bitmap is set to 1
- Unallocated file blocks remain unset (set to 0).
- When files are unlinked (or truncated), the comprising block bits are unset and the blocks are free to be reused.