block_device Struct Reference
[Block Device]

A block device. More...

#include <device.h>

Collaboration diagram for block_device:
Collaboration graph
[legend]

Data Fields

uint32_t nr_blocks
uint16_t block_size
uint8_t flags
void(* prepare_req )(struct block_device *bdev, struct block_request *req, block_addr_t lba, block_len_t nr_blocks, enum block_operation operation)
struct block_request *(* alloc_req )(struct block_device *bdev)
void(* free_req )(struct block_device *bdev, struct block_request *req)
uint32_t(* get_dev_id )(struct block_device *bdev)

Detailed Description

A block device.

A block device can handle block-oriented requests like read and write. Each request operates on one or more blocks.

Definition at line 138 of file device.h.


Field Documentation

struct block_request*(* block_device::alloc_req)(struct block_device *bdev) [read]

For internal use only.

Definition at line 153 of file device.h.

Referenced by block_alloc_request().

For internal use only.

See also:
blkdev_get_block_size()

Definition at line 143 of file device.h.

Referenced by blkdev_get_block_size(), and blkdev_set_block_size().

Flags indicating the state of the device

Definition at line 146 of file device.h.

Referenced by dataflash_detect().

void(* block_device::free_req)(struct block_device *bdev, struct block_request *req)

For internal use only.

Definition at line 155 of file device.h.

Referenced by block_free_request().

For internal use only.

Definition at line 157 of file device.h.

The total number of blocks the device can hold

Definition at line 140 of file device.h.

Referenced by dataflash_detect().

void(* block_device::prepare_req)(struct block_device *bdev, struct block_request *req, block_addr_t lba, block_len_t nr_blocks, enum block_operation operation)

For internal use only.

Definition at line 148 of file device.h.

Referenced by block_prepare_req().


The documentation for this struct was generated from the following file:
Generated on Thu Apr 29 15:18:25 2010 for display-training by  doxygen 1.6.3