StuBS
BlockDevice Class Referenceabstract

#include <fs/blockdevice.h>

Inheritance diagram for BlockDevice:
[legend]

Public Member Functions

 BlockDevice ()
 
virtual Block fix (uint64_t block_number)=0
 
virtual void unfix (Block *block)=0
 
virtual int sync (Block *block)=0
 
virtual int sync ()=0
 
bool set_blocksize (unsigned int blocksize)
 
template<typename T >
divide_by_blocksize (T val) const
 
template<typename T >
modulo_blocksize (T val) const
 

Public Attributes

unsigned int blocksize
 
unsigned int blocksize_bits
 

Private Member Functions

 BlockDevice (const BlockDevice &)=delete
 
BlockDeviceoperator= (const BlockDevice &)=delete
 

Constructor & Destructor Documentation

◆ BlockDevice() [1/2]

BlockDevice::BlockDevice ( )
inline

◆ BlockDevice() [2/2]

BlockDevice::BlockDevice ( const BlockDevice )
privatedelete

Member Function Documentation

◆ fix()

virtual Block BlockDevice::fix ( uint64_t  block_number)
pure virtual

Implemented in Harddisk, Ramdisk, and Bufferdisk.

◆ unfix()

virtual void BlockDevice::unfix ( Block block)
pure virtual

Implemented in Harddisk, Ramdisk, and Bufferdisk.

◆ sync() [1/2]

virtual int BlockDevice::sync ( Block block)
pure virtual

Implemented in Harddisk, Ramdisk, and Bufferdisk.

◆ sync() [2/2]

virtual int BlockDevice::sync ( )
pure virtual

Implemented in Harddisk, Ramdisk, and Bufferdisk.

◆ set_blocksize()

bool BlockDevice::set_blocksize ( unsigned int  blocksize)

◆ divide_by_blocksize()

template<typename T >
T BlockDevice::divide_by_blocksize ( val) const
inline

◆ modulo_blocksize()

template<typename T >
T BlockDevice::modulo_blocksize ( val) const
inline

◆ operator=()

BlockDevice & BlockDevice::operator= ( const BlockDevice )
privatedelete

Member Data Documentation

◆ blocksize

unsigned int BlockDevice::blocksize

◆ blocksize_bits

unsigned int BlockDevice::blocksize_bits

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