PKUOS - Pintos
Pintos source browser for PKU Operating System course
Data Fields
block Struct Reference

A block device. More...

Collaboration diagram for block:
Collaboration graph
[legend]

Data Fields

struct list_elem list_elem
 Element in all_blocks. More...
 
char name [16]
 Block device name. More...
 
enum block_type type
 Type of block device. More...
 
block_sector_t size
 Size in sectors. More...
 
const struct block_operationsops
 Driver operations. More...
 
void * aux
 Extra data owned by driver. More...
 
unsigned long long read_cnt
 Number of sectors read. More...
 
unsigned long long write_cnt
 Number of sectors written. More...
 
struct list_elem free_elem
 Free list element. More...
 

Detailed Description

A block device.

Free block.

Definition at line 9 of file block.c.

Field Documentation

◆ aux

void* block::aux

Extra data owned by driver.

Definition at line 18 of file block.c.

Referenced by block_read(), block_register(), and block_write().

◆ free_elem

struct list_elem block::free_elem

Free list element.

Definition at line 60 of file malloc.c.

Referenced by free(), and malloc().

◆ list_elem

struct list_elem block::list_elem

Element in all_blocks.

Definition at line 11 of file block.c.

Referenced by block_next(), and block_register().

◆ name

char block::name[16]

Block device name.

Definition at line 13 of file block.c.

Referenced by block_get_by_name(), block_name(), block_print_stats(), and block_register().

◆ ops

const struct block_operations* block::ops

Driver operations.

Definition at line 17 of file block.c.

Referenced by block_read(), block_register(), and block_write().

◆ read_cnt

unsigned long long block::read_cnt

Number of sectors read.

Definition at line 20 of file block.c.

Referenced by block_print_stats(), block_read(), and block_register().

◆ size

block_sector_t block::size

Size in sectors.

Definition at line 15 of file block.c.

Referenced by block_register(), block_size(), calloc(), check_sector(), descramble_ata_string(), fsutil_append(), and fsutil_extract().

◆ type

enum block_type block::type

Type of block device.

Definition at line 14 of file block.c.

Referenced by block_print_stats(), block_register(), block_type(), block_type_name(), block_write(), fsutil_extract(), and read_partition_table().

◆ write_cnt

unsigned long long block::write_cnt

Number of sectors written.

Definition at line 21 of file block.c.

Referenced by block_print_stats(), block_register(), and block_write().


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