OCF core API.
More...
#include "ocf_volume.h"
#include "ocf_io.h"
#include "ocf_mngt.h"
Go to the source code of this file.
◆ ocf_core_visitor_t
typedef int(* ocf_core_visitor_t) (ocf_core_t core, void *cntx) |
Core visitor function type which is called back when iterating over cores.
- Parameters
-
[in] | core | Core which is currently iterated (visited) |
[in] | cntx | Visitor context |
- Return values
-
0 | continue visiting cores |
Non-zero | stop iterating and return result |
◆ ocf_core_get_by_name()
Get OCF core by name.
- Parameters
-
[in] | cache | OCF cache |
[in] | name | Core name |
[in] | name_len | Core name length |
[out] | core | OCF core handle |
- Return values
-
0 | Get cache successfully |
-OCF_ERR_CORE_NOT_EXIST | Core with given name doesn't exist |
◆ ocf_core_get_cache()
Obtain cache object from core.
- Parameters
-
- Return values
-
◆ ocf_core_get_front_volume()
Obtain volume of the core.
- Parameters
-
- Return values
-
◆ ocf_core_get_info()
Get info of given core object.
- Parameters
-
[in] | core | Core object |
[out] | info | Core info structure |
- Return values
-
◆ ocf_core_get_name()
Get name of given core object.
- Parameters
-
- Return values
-
◆ ocf_core_get_priv()
Get core private data.
- Parameters
-
- Return values
-
◆ ocf_core_get_seq_cutoff_policy()
Get sequential cutoff policy of given core object.
- Parameters
-
- Return values
-
◆ ocf_core_get_seq_cutoff_threshold()
uint32_t ocf_core_get_seq_cutoff_threshold |
( |
ocf_core_t |
core | ) |
|
Get sequential cutoff threshold of given core object.
- Parameters
-
- Return values
-
Sequential | cutoff threshold [B] |
◆ ocf_core_get_state()
Get core state.
- Parameters
-
- Return values
-
◆ ocf_core_get_volume()
Obtain volume associated with core.
- Parameters
-
- Return values
-
◆ ocf_core_set_priv()
void ocf_core_set_priv |
( |
ocf_core_t |
core, |
|
|
void * |
priv |
|
) |
| |
Set core private data.
- Parameters
-
[in] | core | Core object |
[in] | priv | Private data |
◆ ocf_core_submit_io_fast()
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 request queue.
- Parameters
-
- Return values
-
0 | IO has been submitted successfully |
Non-zero | Fast submit failed. Try to submit IO with ocf_core_submit_io() |
◆ ocf_core_visit()
Run visitor function for each core of given cache.
- Parameters
-
[in] | cache | OCF cache instance |
[in] | visitor | Visitor function |
[in] | cntx | Visitor context |
[in] | only_opened | Visit only opened cores |
- Return values
-