Open CAS Framework
Open source framework of Cache Acceleration Software
|
IO class API. More...
Go to the source code of this file.
Data Structures | |
struct | ocf_io_class_info |
OCF IO class information. More... | |
Typedefs | |
typedef int(* | ocf_io_class_visitor_t) (ocf_cache_t cache, uint32_t io_class_id, void *cntx) |
helper function for ocf_io_class_visit More... | |
Functions | |
int | ocf_cache_io_class_get_info (ocf_cache_t cache, uint32_t io_class, struct ocf_io_class_info *info) |
retrieve io class info More... | |
int | ocf_io_class_visit (ocf_cache_t cache, ocf_io_class_visitor_t visitor, void *cntx) |
enumerate all of the available IO classes. More... | |
IO class API.
File contains structures and methods for handling IO Class differentiation features
typedef int(* ocf_io_class_visitor_t) (ocf_cache_t cache, uint32_t io_class_id, void *cntx) |
helper function for ocf_io_class_visit
This function is called back from ocf_io_class_visit for each valid configured io class; henceforth all parameters are input parameters, no exceptions. It is usable to enumerate all the io classes.
[in] | cache | cache id of cache for which data is being retrieved |
[in] | io_class_id | id of an io class for which callback herein is invoked. |
[in] | cntx | a context pointer passed herein from within ocf_io_class_visit down to this callback. |
int ocf_cache_io_class_get_info | ( | ocf_cache_t | cache, |
uint32_t | io_class, | ||
struct ocf_io_class_info * | info | ||
) |
retrieve io class info
function meant to retrieve information pertaining to particular IO class, specifically to fill ocf_io_class_info structure based on input parameters.
[in] | cache | cache handle, to which specified request pertains. |
[in] | io_class | id of an io class which shall be retreived. |
[out] | info | io class info structures to be filled as a result of this function call. |
int ocf_io_class_visit | ( | ocf_cache_t | cache, |
ocf_io_class_visitor_t | visitor, | ||
void * | cntx | ||
) |
enumerate all of the available IO classes.
This function allows enumeration and retrieval of all io class id's that are valid for given cache id via visiting all those with callback function that is supplied by caller.
[in] | cache | cache id to which given call pertains |
[in] | visitor | a callback function that will be issued for each and every IO class that is configured and valid within given cache instance |
[in] | cntx | a context variable - structure that shall be passed to a callback function for every call |