Add cache activation from passive state

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2021-08-12 13:04:50 +02:00
parent cc22c57cb7
commit 7b38ad205c
3 changed files with 397 additions and 43 deletions

View File

@@ -128,6 +128,12 @@ typedef enum {
/** Core with the uuid already exists */
OCF_ERR_CORE_UUID_EXISTS,
/** Cache initialized with wrong metadata layout */
OCF_ERR_METADATA_LAYOUT_MISMATCH,
/** Cache initialized with wrong cache line size */
OCF_ERR_CACHE_LINE_SIZE_MISMATCH,
} ocf_error_t;
#endif /* __OCF_ERR_H__ */

View File

@@ -536,6 +536,28 @@ 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);
/**
* @brief Completion callback of cache activate operation
*
* @param[in] cache Cache handle
* @param[in] priv Callback context
* @param[in] error Error code (zero on success)
*/
typedef void (*ocf_mngt_cache_activate_end_t)(ocf_cache_t cache,
void *priv, int error);
/**
* @brief Activate 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_activate(ocf_cache_t cache,
struct ocf_mngt_cache_device_config *cfg,
ocf_mngt_cache_activate_end_t cmpl, void *priv);
/* Adding and removing cores */
/**