14#ifndef _RTEMS_DISKDEVS_H
15#define _RTEMS_DISKDEVS_H
59#define RTEMS_DISK_READ_AHEAD_NO_TRIGGER ((rtems_blkdev_bnum) -1)
64#define RTEMS_DISK_READ_AHEAD_SIZE_AUTO (0)
313 return rtems_filesystem_dev_major_t(dd->
dev);
321 return rtems_filesystem_dev_minor_t(dd->
dev);
324static inline void *rtems_disk_get_driver_data(
331static inline uint32_t rtems_disk_get_media_block_size(
338static inline uint32_t rtems_disk_get_block_size(
This header file provides the Chains API.
#define RTEMS_DEPRECATED
Instructs the compiler in a declaration to issue a warning whenever a variable, function,...
Definition: basedefs.h:334
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition: io.h:103
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition: io.h:115
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_blkdev_bnum
Block device block index type.
Definition: diskdevs.h:45
int(* rtems_block_device_ioctl)(rtems_disk_device *dd, uint32_t req, void *argp)
Block device IO control handler type.
Definition: diskdevs.h:50
This header file defines the RTEMS Classic API.
This structure represents a chain node.
Definition: chain.h:78
Block device read-ahead control.
Definition: diskdevs.h:69
rtems_chain_node node
Chain node for the read-ahead request queue of the read-ahead task.
Definition: diskdevs.h:73
rtems_blkdev_bnum next
Start block for the next read-ahead request.
Definition: diskdevs.h:90
uint32_t nr_blocks
Size of the next read-ahead request in blocks.
Definition: diskdevs.h:98
rtems_blkdev_bnum trigger
Block value to trigger the read-ahead request.
Definition: diskdevs.h:82
Block device statistics.
Definition: diskdevs.h:106
uint32_t read_ahead_peeks
Read-ahead transfers caused by a peek.
Definition: diskdevs.h:135
uint32_t read_ahead_transfers
Read-ahead transfer count.
Definition: diskdevs.h:130
uint32_t read_blocks
Count of blocks transfered from the device.
Definition: diskdevs.h:140
uint32_t read_errors
Read error count.
Definition: diskdevs.h:147
uint32_t write_errors
Write error count.
Definition: diskdevs.h:166
uint32_t write_blocks
Count of blocks transfered to the device.
Definition: diskdevs.h:159
uint32_t read_misses
Read miss count.
Definition: diskdevs.h:122
uint32_t write_transfers
Write transfer count.
Definition: diskdevs.h:154
uint32_t read_hits
Read hit count.
Definition: diskdevs.h:113
Description of a disk device (logical and physical disks).
Definition: diskdevs.h:177
uint32_t media_block_size
Media block size in bytes.
Definition: diskdevs.h:224
rtems_block_device_ioctl ioctl
IO control handler for this disk.
Definition: diskdevs.h:271
void * driver_data
Private data for the disk driver.
Definition: diskdevs.h:276
dev_t dev
Device identifier (concatenation of major and minor number).
Definition: diskdevs.h:181
size_t bds_per_group
Buffer descriptors per group count.
Definition: diskdevs.h:266
rtems_blkdev_stats stats
Device statistics for this disk.
Definition: diskdevs.h:287
uint32_t capabilities
Driver capabilities.
Definition: diskdevs.h:192
unsigned uses
Usage counter.
Definition: diskdevs.h:204
rtems_blkdev_bnum start
Start media block number.
Definition: diskdevs.h:212
rtems_blkdev_read_ahead read_ahead
Read-ahead control for this disk.
Definition: diskdevs.h:292
rtems_disk_device * phys_dev
Physical device identifier (equals the dev entry if it specifies a physical device).
Definition: diskdevs.h:187
rtems_blkdev_bnum size
Size of the physical or logical disk in media blocks.
Definition: diskdevs.h:217
bool deleted
Indicates that this disk should be deleted as soon as the last user releases this disk.
Definition: diskdevs.h:282
uint32_t block_size
Block size in bytes.
Definition: diskdevs.h:234
uint32_t media_blocks_per_block
Media blocks per device blocks.
Definition: diskdevs.h:248
char * name
Disk device name.
Definition: diskdevs.h:197
int block_to_media_block_shift
Block to media block shift.
Definition: diskdevs.h:259
rtems_blkdev_bnum block_count
Block count.
Definition: diskdevs.h:241