RTEMS 6.1-rc1
|
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_device * | phys_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. | |
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.
size_t rtems_disk_device::bds_per_group |
Buffer descriptors per group count.
rtems_blkdev_bnum rtems_disk_device::block_count |
Block count.
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.
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.
uint32_t rtems_disk_device::media_block_size |
Media block size in bytes.
This is the media transfer unit the hardware defaults to.
uint32_t rtems_disk_device::media_blocks_per_block |
Media blocks per device blocks.
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.
unsigned rtems_disk_device::uses |
Usage counter.
Devices cannot be deleted if they are in use.