7 #ifndef __OCF_CACHE_H__ 8 #define __OCF_CACHE_H__ struct ocf_cache * ocf_cache_t
handle to object designating ocf cache device
Definition: ocf_types.h:44
ocf_promotion_t
Definition: ocf_def.h:214
uint64_t metadata_footprint
Definition: ocf_cache.h:93
uint32_t dirty
Definition: ocf_cache.h:48
ocf_cache_line_size_t cache_line_size
Definition: ocf_cache.h:84
struct ocf_stat clean
Definition: ocf_cache.h:38
void * ocf_cache_get_priv(ocf_cache_t cache)
Get cache private data.
uint32_t dirty_for
Definition: ocf_cache.h:56
uint64_t ocf_cache_bytes_2_lines(ocf_cache_t cache, uint64_t bytes)
Convert bytes to cache lines.
const char * ocf_cache_get_name(ocf_cache_t cache)
Get name of given cache object.
bool status
Definition: ocf_cache.h:67
uint32_t metadata_end_offset
Definition: ocf_cache.h:96
ocf_ctx_t ocf_cache_get_ctx(ocf_cache_t cache)
Get OCF context of given cache object.
uint32_t dirty_initial
Definition: ocf_cache.h:51
uint32_t core_count
Definition: ocf_cache.h:90
ocf_eviction_t
Definition: ocf_def.h:200
bool ocf_cache_is_device_attached(ocf_cache_t cache)
Check if caching device is attached.
struct ocf_ctx * ocf_ctx_t
handle to object designating ocf context
Definition: ocf_types.h:38
ocf_cache_mode_t ocf_cache_get_mode(ocf_cache_t cache)
Get cache mode of given cache object.
ocf_cleaning_t cleaning_policy
Definition: ocf_cache.h:78
uint32_t size
Definition: ocf_cache.h:30
ocf_volume_t ocf_cache_get_volume(ocf_cache_t cache)
Obtain volume from cache.
ocf_promotion_t promotion_policy
Definition: ocf_cache.h:81
struct ocf_stat dirty
Definition: ocf_cache.h:41
bool ocf_cache_is_incomplete(ocf_cache_t cache)
Check is cache in incomplete state.
ocf_cache_line_size_t ocf_cache_get_line_size(ocf_cache_t cache)
Get cache line size of given cache object.
ocf_eviction_t eviction_policy
Definition: ocf_cache.h:75
uint8_t ocf_cache_get_type_id(ocf_cache_t cache)
Get volume type id of given cache object.
ocf_cache_mode_t
Definition: ocf_def.h:149
OCF volume UUID.
Definition: ocf_volume.h:28
uint32_t flushed
Definition: ocf_cache.h:87
ocf_cache_line_size_t
Definition: ocf_def.h:258
bool attached
Definition: ocf_cache.h:24
struct ocf_stat occupancy
Definition: ocf_cache.h:35
int error_counter
Definition: ocf_cache.h:64
OCF API for updating and reseting statistics.
int ocf_cache_get_info(ocf_cache_t cache, struct ocf_cache_info *info)
Get cache mode of given cache object.
struct ocf_volume * ocf_volume_t
handle to object designating ocf volume
Definition: ocf_types.h:56
uint8_t volume_type
Definition: ocf_cache.h:27
ocf_cleaning_t
Definition: ocf_def.h:231
Cache info: configuration, status.
Definition: ocf_cache.h:23
void ocf_cache_set_priv(ocf_cache_t cache, void *priv)
Set cache private data.
ocf_cache_mode_t cache_mode
Definition: ocf_cache.h:59
const struct ocf_volume_uuid * ocf_cache_get_uuid(ocf_cache_t cache)
Get UUID of volume associated with cache.
bool ocf_cache_is_running(ocf_cache_t cache)
Check if cache object is running.
Definition: ocf_stats.h:19
uint32_t ocf_cache_get_core_count(ocf_cache_t cache)
Get core count of given cache object.
uint8_t state
Definition: ocf_cache.h:72
uint32_t occupancy
Definition: ocf_cache.h:45