11 #ifndef __OCF_CORE_H__    12 #define __OCF_CORE_H__   161 static inline void ocf_core_submit_io(
struct ocf_io *io)
   182 static inline void ocf_core_submit_flush(
struct ocf_io *io)
   192 static inline void ocf_core_submit_discard(
struct ocf_io *io)
 struct ocf_cache * ocf_cache_t
handle to object designating ocf cache device 
Definition: ocf_types.h:44
ocf_seq_cutoff_policy seq_cutoff_policy
Definition: ocf_core.h:41
ocf_volume_t ocf_core_get_front_volume(ocf_core_t core)
Obtain volume of the core. 
ocf_seq_cutoff_policy
Definition: ocf_def.h:180
uint64_t core_size_bytes
Definition: ocf_core.h:23
ocf_volume_t ocf_core_get_volume(ocf_core_t core)
Obtain volume associated with core. 
int ocf_core_get_info(ocf_core_t core, struct ocf_core_info *info)
Get info of given core object. 
OCF IO main structure. 
Definition: ocf_io.h:50
const struct ocf_volume_uuid * ocf_volume_get_uuid(ocf_volume_t volume)
Get volume UUID. 
uint32_t ocf_core_get_seq_cutoff_threshold(ocf_core_t core)
Get sequential cutoff threshold of given core object. 
uint32_t dirty
Definition: ocf_core.h:31
uint64_t core_size
Definition: ocf_core.h:20
OCF management operations definitions. 
uint64_t flags
OCF IO flags. 
Definition: ocf_io.h:59
uint32_t dirty_for
Definition: ocf_core.h:35
void ocf_volume_submit_io(struct ocf_io *io)
Submit io to volume. 
void * ocf_core_get_priv(ocf_core_t core)
Get core private data. 
int ocf_core_submit_io_fast(struct ocf_io *io)
Fast path for submitting IO. If possible, request is processed immediately without adding to internal...
Definition: ocf_core.h:18
OCF volume UUID. 
Definition: ocf_volume.h:28
int ocf_core_visit(ocf_cache_t cache, ocf_core_visitor_t visitor, void *cntx, bool only_opened)
Run visitor function for each core of given cache. 
uint32_t dir
OCF IO direction. 
Definition: ocf_io.h:74
ocf_cache_t ocf_core_get_cache(ocf_core_t core)
Obtain cache object from core. 
uint32_t io_class
OCF IO destination class. 
Definition: ocf_io.h:69
uint32_t flushed
Definition: ocf_core.h:28
struct ocf_volume * ocf_volume_t
handle to object designating ocf volume 
Definition: ocf_types.h:56
struct ocf_io * ocf_volume_new_io(ocf_volume_t volume, ocf_queue_t queue, uint64_t addr, uint32_t bytes, uint32_t dir, uint32_t io_class, uint64_t flags)
Allocate new io. 
struct ocf_queue * ocf_queue_t
handle to I/O queue 
Definition: ocf_types.h:78
uint64_t addr
OCF IO destination address. 
Definition: ocf_io.h:54
ocf_seq_cutoff_policy ocf_core_get_seq_cutoff_policy(ocf_core_t core)
Get sequential cutoff policy of given core object. 
uint32_t bytes
OCF IO size in bytes. 
Definition: ocf_io.h:64
int ocf_core_get_by_name(ocf_cache_t cache, const char *name, size_t name_len, ocf_core_t *core)
Get OCF core by name. 
ocf_core_state_t
Definition: ocf_def.h:134
void ocf_core_set_priv(ocf_core_t core, void *priv)
Set core private data. 
void ocf_volume_submit_flush(struct ocf_io *io)
Submit flush to volume. 
uint32_t seq_cutoff_threshold
Definition: ocf_core.h:38
struct ocf_core * ocf_core_t
handle to object designating ocf core object 
Definition: ocf_types.h:50
void ocf_volume_submit_discard(struct ocf_io *io)
Submit discard to volume. 
ocf_core_state_t ocf_core_get_state(ocf_core_t core)
Get core state. 
const char * ocf_core_get_name(ocf_core_t core)
Get name of given core object. 
int(* ocf_core_visitor_t)(ocf_core_t core, void *cntx)
Core visitor function type which is called back when iterating over cores. 
Definition: ocf_core.h:207