StuBS
Block Class Reference

#include <fs/block.h>

Collaboration diagram for Block:
[legend]

Public Member Functions

 Block (BlockDevice *bdev, uint64_t block_number)
 
 Block ()
 
void mark_dirty ()
 
bool is_dirty () const
 
void clear_dirty ()
 
unsigned int get_size () const
 
void sync ()
 
void unfix ()
 
void forget ()
 

Public Attributes

uint64_t block_number
 
void * data
 
BlockDevicebdev
 
int flags
 

Static Public Attributes

static const int DIRTY_FLAG = 0x1
 

Constructor & Destructor Documentation

◆ Block() [1/2]

Block::Block ( BlockDevice bdev,
uint64_t  block_number 
)
inline

◆ Block() [2/2]

Block::Block ( )
inline

Member Function Documentation

◆ mark_dirty()

void Block::mark_dirty ( )
inline

◆ is_dirty()

bool Block::is_dirty ( ) const
inline

◆ clear_dirty()

void Block::clear_dirty ( )
inline

◆ get_size()

unsigned int Block::get_size ( ) const
inline

◆ sync()

void Block::sync ( )
inline

◆ unfix()

void Block::unfix ( )
inline

◆ forget()

void Block::forget ( )
inline

Member Data Documentation

◆ DIRTY_FLAG

const int Block::DIRTY_FLAG = 0x1
static

◆ block_number

uint64_t Block::block_number

◆ data

void* Block::data

◆ bdev

BlockDevice* Block::bdev

◆ flags

int Block::flags

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