RTEMS  5.0.0
Data Fields
rtems_disk_device Struct Reference

Description of a disk device (logical and physical disks). More...

#include <diskdevs.h>

Data Fields

dev_t dev
 Device identifier (concatenation of major and minor number).
 
rtems_disk_devicephys_dev
 Physical device identifier (equals the dev entry if it specifies a physical device).
 
uint32_t capabilities
 Driver capabilities.
 
char * name
 Disk device name.
 
unsigned uses
 Usage counter. More...
 
rtems_blkdev_bnum start
 Start media block number. More...
 
rtems_blkdev_bnum size
 Size of the physical or logical disk in media blocks.
 
uint32_t media_block_size
 Media block size in bytes. More...
 
uint32_t block_size
 Block size in bytes. More...
 
rtems_blkdev_bnum block_count
 Block count. More...
 
uint32_t media_blocks_per_block
 Media blocks per device blocks. More...
 
int block_to_media_block_shift
 Block to media block shift. More...
 
size_t bds_per_group
 Buffer descriptors per group count. More...
 
rtems_block_device_ioctl ioctl
 IO control handler for this disk.
 
void * driver_data
 Private data for the disk driver.
 
bool deleted
 Indicates that this disk should be deleted as soon as the last user releases this disk.
 
rtems_blkdev_stats stats
 Device statistics for this disk.
 
rtems_blkdev_read_ahead read_ahead
 Read-ahead control for this disk.
 

Detailed Description

Description of a disk device (logical and physical disks).

An array of pointer tables to rtems_disk_device structures is maintained. The first table will be indexed by the major number and the second table will be indexed by the minor number. This allows quick lookup using a data structure of moderated size.

Field Documentation

◆ bds_per_group

size_t rtems_disk_device::bds_per_group

Buffer descriptors per group count.

See also
rtems_bdbuf_set_block_size().

◆ block_count

rtems_blkdev_bnum rtems_disk_device::block_count

Block count.

See also
rtems_bdbuf_set_block_size().

◆ block_size

uint32_t rtems_disk_device::block_size

Block size in bytes.

This is the minimum transfer unit. It may be a multiple of the media block size. It must be positive.

See also
rtems_bdbuf_set_block_size().

◆ block_to_media_block_shift

int rtems_disk_device::block_to_media_block_shift

Block to media block shift.

In case this value is non-negative the media block of a block can be calculated as media block = block << block_to_media_block_shift, otherwise a 64-bit operation will be used.

See also
rtems_bdbuf_set_block_size().

◆ media_block_size

uint32_t rtems_disk_device::media_block_size

Media block size in bytes.

This is the media transfer unit the hardware defaults to.

◆ media_blocks_per_block

uint32_t rtems_disk_device::media_blocks_per_block

Media blocks per device blocks.

See also
rtems_bdbuf_set_block_size().

◆ start

rtems_blkdev_bnum rtems_disk_device::start

Start media block number.

Equals zero for physical devices. It is a media block offset to the related physical device for logical device.

◆ uses

unsigned rtems_disk_device::uses

Usage counter.

Devices cannot be deleted if they are in use.


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