RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables

Block Device Buffer Management. More...

#include <rtems.h>
#include <rtems/libio.h>
#include <rtems/chain.h>
#include <rtems/blkdev.h>
#include <rtems/diskdevs.h>

Go to the source code of this file.

Data Structures

struct  rtems_bdbuf_buffer
 
struct  rtems_bdbuf_buffer::rtems_bdbuf_avl_node
 
struct  rtems_bdbuf_group
 
struct  rtems_bdbuf_config
 

Macros

#define RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT   0
 
#define RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT   16
 
#define RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT   15
 
#define RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT   250
 
#define RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT   1000
 
#define RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT   0
 
#define RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT    RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
 
#define RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT    RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
 
#define RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT   RTEMS_MINIMUM_STACK_SIZE
 
#define RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT   (64 * 512)
 
#define RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT   (512)
 
#define RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT   (4096)
 

Typedefs

typedef struct rtems_bdbuf_group rtems_bdbuf_group
 
typedef struct rtems_bdbuf_buffer rtems_bdbuf_buffer
 
typedef struct rtems_bdbuf_config rtems_bdbuf_config
 

Enumerations

enum  rtems_bdbuf_buf_state {
  RTEMS_BDBUF_STATE_FREE = 0 , RTEMS_BDBUF_STATE_EMPTY , RTEMS_BDBUF_STATE_CACHED , RTEMS_BDBUF_STATE_ACCESS_CACHED ,
  RTEMS_BDBUF_STATE_ACCESS_MODIFIED , RTEMS_BDBUF_STATE_ACCESS_EMPTY , RTEMS_BDBUF_STATE_ACCESS_PURGED , RTEMS_BDBUF_STATE_MODIFIED ,
  RTEMS_BDBUF_STATE_SYNC , RTEMS_BDBUF_STATE_TRANSFER , RTEMS_BDBUF_STATE_TRANSFER_PURGED
}
 State of a buffer of the cache. More...
 

Functions

rtems_status_code rtems_bdbuf_init (void)
 
rtems_status_code rtems_bdbuf_get (rtems_disk_device *dd, rtems_blkdev_bnum block, rtems_bdbuf_buffer **bd)
 
rtems_status_code rtems_bdbuf_read (rtems_disk_device *dd, rtems_blkdev_bnum block, rtems_bdbuf_buffer **bd)
 
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.
 
rtems_status_code rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
 
rtems_status_code rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
 
rtems_status_code rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
 
rtems_status_code rtems_bdbuf_syncdev (rtems_disk_device *dd)
 
void rtems_bdbuf_purge_dev (rtems_disk_device *dd)
 Purges all buffers corresponding to the disk device dd.
 
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.
 
void rtems_bdbuf_get_device_stats (const rtems_disk_device *dd, rtems_blkdev_stats *stats)
 Returns the block device statistics.
 
void rtems_bdbuf_reset_device_stats (rtems_disk_device *dd)
 Resets the block device statistics.
 

Variables

const rtems_bdbuf_config rtems_bdbuf_configuration
 

Detailed Description

Block Device Buffer Management.