Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Superblock Class Reference

A Superblock records the completion of a checkpoint. More...

#include <storage.h>

List of all members.

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


Detailed Description

A Superblock records the completion of a checkpoint.

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.


Member Function Documentation

Superblock* Superblock::create unsigned int    block_size [inline, static]
 

Create a new superblock of the given size and return it.


Member Data Documentation

unsigned int Superblock::block_directory
 

first block of block directory.

unsigned int Superblock::blocks_per_segment
 

number of blocks per disk segment.

unsigned int Superblock::checkpoint_counter
 

ID number of recent checkpoint.

const unsigned int Superblock::CORRECT_SIGNATURE = 0xbb66 [static]
 

unsigned int Superblock::curr_empty_segment
 

first block of current empty segment.

unsigned int Superblock::segment_directory
 

first block of segment directory.

unsigned int Superblock::signature
 

magic num for a Torsion superblock.


The documentation for this class was generated from the following file:

Torsion Operating System, Copyright (C) 2000-2002 Dan Helfman