Introduce passive cache state
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -103,6 +103,15 @@ struct ocf_cache_info {
|
||||
*/
|
||||
ocf_volume_t ocf_cache_get_volume(ocf_cache_t cache);
|
||||
|
||||
/**
|
||||
* @brief Obtain front volume from cache
|
||||
*
|
||||
* @param[in] cache Cache object
|
||||
*
|
||||
* @retval Volume, NULL if dettached.
|
||||
*/
|
||||
ocf_volume_t ocf_cache_get_front_volume(ocf_cache_t cache);
|
||||
|
||||
/**
|
||||
* @brief Get name of given cache object
|
||||
*
|
||||
|
||||
@@ -124,6 +124,9 @@ typedef enum {
|
||||
ocf_cache_state_incomplete = 3, //!< ocf_cache_state_incomplete
|
||||
/*!< OCF cache has at least one inactive core */
|
||||
|
||||
ocf_cache_state_passive = 4, //!< ocf_cache_state_passive
|
||||
/*!< OCF is currently in passive mode */
|
||||
|
||||
ocf_cache_state_max //!< ocf_cache_state_max
|
||||
/*!< Stopper of cache state enumerator */
|
||||
} ocf_cache_state_t;
|
||||
|
||||
@@ -514,6 +514,28 @@ void ocf_mngt_cache_load(ocf_cache_t cache,
|
||||
struct ocf_mngt_cache_device_config *cfg,
|
||||
ocf_mngt_cache_load_end_t cmpl, void *priv);
|
||||
|
||||
/**
|
||||
* @brief Completion callback of cache bind operation
|
||||
*
|
||||
* @param[in] cache Cache handle
|
||||
* @param[in] priv Callback context
|
||||
* @param[in] error Error code (zero on success)
|
||||
*/
|
||||
typedef void (*ocf_mngt_cache_bind_end_t)(ocf_cache_t cache,
|
||||
void *priv, int error);
|
||||
|
||||
/**
|
||||
* @brief Bind cache instance
|
||||
*
|
||||
* @param[in] cache Cache handle
|
||||
* @param[in] cfg Caching device configuration
|
||||
* @param[in] cmpl Completion callback
|
||||
* @param[in] priv Completion callback context
|
||||
*/
|
||||
void ocf_mngt_cache_bind(ocf_cache_t cache,
|
||||
struct ocf_mngt_cache_device_config *cfg,
|
||||
ocf_mngt_cache_bind_end_t cmpl, void *priv);
|
||||
|
||||
/* Adding and removing cores */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user