399#define RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT 0
404#define RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT 16
409#define RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT 15
414#define RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT 250
419#define RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT 1000
424#define RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT 0
429#define RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT \
430 RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
435#define RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT \
436 RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
441#define RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT RTEMS_MINIMUM_STACK_SIZE
446#define RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT (64 * 512)
451#define RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT (512)
456#define RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT (4096)
This header file provides the Chains API.
Block Device Disk Management API.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_task_priority
This integer type represents task priorities of the Classic API.
Definition: types.h:257
rtems_status_code rtems_bdbuf_release(rtems_bdbuf_buffer *bd)
Definition: bdbuf.c:2155
rtems_bdbuf_buf_state
State of a buffer of the cache.
Definition: bdbuf.h:239
rtems_status_code rtems_bdbuf_get(rtems_disk_device *dd, rtems_blkdev_bnum block, rtems_bdbuf_buffer **bd)
Definition: bdbuf.c:1788
rtems_status_code rtems_bdbuf_syncdev(rtems_disk_device *dd)
Definition: bdbuf.c:2253
void rtems_bdbuf_reset_device_stats(rtems_disk_device *dd)
Resets the block device statistics.
Definition: bdbuf.c:3032
rtems_status_code rtems_bdbuf_release_modified(rtems_bdbuf_buffer *bd)
Definition: bdbuf.c:2189
rtems_status_code rtems_bdbuf_set_block_size(rtems_disk_device *dd, uint32_t block_size, bool sync)
Sets the block size of a disk device.
Definition: bdbuf.c:2893
rtems_status_code rtems_bdbuf_read(rtems_disk_device *dd, rtems_blkdev_bnum block, rtems_bdbuf_buffer **bd)
Definition: bdbuf.c:2063
rtems_status_code rtems_bdbuf_sync(rtems_bdbuf_buffer *bd)
Definition: bdbuf.c:2221
void rtems_bdbuf_get_device_stats(const rtems_disk_device *dd, rtems_blkdev_stats *stats)
Returns the block device statistics.
Definition: bdbuf.c:3024
const rtems_bdbuf_config rtems_bdbuf_configuration
void rtems_bdbuf_peek(rtems_disk_device *dd, rtems_blkdev_bnum block, uint32_t nr_blocks)
Give a hint which blocks should be cached next.
Definition: bdbuf.c:2122
void rtems_bdbuf_purge_dev(rtems_disk_device *dd)
Purges all buffers corresponding to the disk device dd.
Definition: bdbuf.c:2885
rtems_status_code rtems_bdbuf_init(void)
Definition: bdbuf.c:1508
@ RTEMS_BDBUF_STATE_SYNC
Scheduled for synchronization.
Definition: bdbuf.h:283
@ RTEMS_BDBUF_STATE_ACCESS_CACHED
Accessed by upper layer with cached data.
Definition: bdbuf.h:258
@ RTEMS_BDBUF_STATE_ACCESS_EMPTY
Accessed by upper layer with invalid data.
Definition: bdbuf.h:268
@ RTEMS_BDBUF_STATE_ACCESS_PURGED
Accessed by upper layer with purged data.
Definition: bdbuf.h:273
@ RTEMS_BDBUF_STATE_TRANSFER
In transfer by block device driver.
Definition: bdbuf.h:288
@ RTEMS_BDBUF_STATE_FREE
Free.
Definition: bdbuf.h:243
@ RTEMS_BDBUF_STATE_ACCESS_MODIFIED
Accessed by upper layer with modified data.
Definition: bdbuf.h:263
@ RTEMS_BDBUF_STATE_CACHED
Cached.
Definition: bdbuf.h:253
@ RTEMS_BDBUF_STATE_TRANSFER_PURGED
In transfer by block device driver and purged.
Definition: bdbuf.h:293
@ RTEMS_BDBUF_STATE_MODIFIED
Modified by upper layer.
Definition: bdbuf.h:278
@ RTEMS_BDBUF_STATE_EMPTY
Empty.
Definition: bdbuf.h:248
uint32_t rtems_blkdev_bnum
Block device block index type.
Definition: diskdevs.h:45
This header file defines the RTEMS Classic API.
This structure represents a chain node.
Definition: chain.h:78
signed char cache
Definition: bdbuf.h:316
signed char bal
Definition: bdbuf.h:317
struct rtems_bdbuf_buffer * right
Definition: bdbuf.h:315
struct rtems_bdbuf_buffer * left
Definition: bdbuf.h:314
uint32_t waiters
Definition: bdbuf.h:328
rtems_disk_device * dd
Definition: bdbuf.h:320
unsigned char * buffer
Definition: bdbuf.h:324
rtems_blkdev_bnum block
Definition: bdbuf.h:322
void * user
Definition: bdbuf.h:336
int references
Definition: bdbuf.h:335
rtems_bdbuf_group * group
Definition: bdbuf.h:330
rtems_chain_node link
Definition: bdbuf.h:310
uint32_t hold_timer
Definition: bdbuf.h:332
rtems_bdbuf_buf_state state
Definition: bdbuf.h:326
size_t swapout_workers
Definition: bdbuf.h:371
rtems_task_priority swapout_worker_priority
Definition: bdbuf.h:374
size_t size
Definition: bdbuf.h:378
size_t task_stack_size
Definition: bdbuf.h:376
uint32_t buffer_min
Definition: bdbuf.h:380
uint32_t swap_block_hold
Definition: bdbuf.h:370
uint32_t max_write_blocks
Definition: bdbuf.h:364
uint32_t swapout_period
Definition: bdbuf.h:368
rtems_task_priority swapout_priority
Definition: bdbuf.h:366
rtems_task_priority read_ahead_priority
Definition: bdbuf.h:384
uint32_t buffer_max
Definition: bdbuf.h:381
uint32_t max_read_ahead_blocks
Definition: bdbuf.h:362
rtems_bdbuf_buffer * bdbuf
Definition: bdbuf.h:354
uint32_t users
Definition: bdbuf.h:353
size_t bds_per_group
Definition: bdbuf.h:350
rtems_chain_node link
Definition: bdbuf.h:348
Block device statistics.
Definition: diskdevs.h:106
Description of a disk device (logical and physical disks).
Definition: diskdevs.h:177