#include <storage.h>
Static Public Methods | |
Superblock * | create (unsigned int block_size) |
Public Attributes | |
unsigned int | signature |
unsigned int | checkpoint_counter |
unsigned int | block_directory |
unsigned int | segment_directory |
unsigned int | blocks_per_segment |
unsigned int | curr_empty_segment |
Static Public Attributes | |
const unsigned int | CORRECT_SIGNATURE = 0xbb66 |
The Torsion storage system has two superblocks at fixed locations on the disk. Every time a checkpoint is completed, various storage meta-data are written to one of the superblocks so that the storage system's state can be easily recovered on boot. There are two superblocks so that at least one superblock is always in a consistent state.
|
Create a new superblock of the given size and return it.
|
|
first block of block directory.
|
|
number of blocks per disk segment.
|
|
ID number of recent checkpoint.
|
|
|
|
first block of current empty segment.
|
|
first block of segment directory.
|
|
magic num for a Torsion superblock.
|
Torsion Operating System, Copyright (C) 2000-2002 Dan Helfman