RTEMS CPU Kit with SuperCore  4.10.99.0
Data Fields
rtems_disk_device Struct Reference

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

#include <diskdevs.h>

Collaboration diagram for rtems_disk_device:
Collaboration graph
[legend]

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.
rtems_blkdev_bnum start
 Start media block number.
rtems_blkdev_bnum size
 Size of the physical or logical disk in media blocks.
uint32_t media_block_size
 Media block size in bytes.
uint32_t block_size
 Block size in bytes.
rtems_blkdev_bnum block_count
 Block count.
uint32_t media_blocks_per_block
 Media blocks per device blocks.
int block_to_media_block_shift
 Block to media block shift.
size_t bds_per_group
 Buffer descriptors per group count.
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

Buffer descriptors per group count.

See also:
rtems_bdbuf_set_block_size().

Block count.

See also:
rtems_bdbuf_set_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.

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 in bytes.

This is the media transfer unit the hardware defaults to.

Media blocks per device blocks.

See also:
rtems_bdbuf_set_block_size().

Start media block number.

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

Usage counter.

Devices cannot be deleted if they are in use.


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