Implement asynchronous attach, load, detach and stop
NOTE: This is still not the real asynchronism. Metadata interfaces are still not fully asynchronous. Signed-off-by: Robert Baldyga <robert.baldyga@intel.com> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
@@ -266,12 +266,4 @@ void ocf_cache_set_priv(ocf_cache_t cache, void *priv);
|
||||
*/
|
||||
void *ocf_cache_get_priv(ocf_cache_t cache);
|
||||
|
||||
/**
|
||||
* @brief Set queue to be used during flush operation
|
||||
*
|
||||
* @param[in] cache Cache object
|
||||
* @param[in] queue Queue object
|
||||
*/
|
||||
void ocf_cache_set_flush_queue(ocf_cache_t cache, ocf_queue_t queue);
|
||||
|
||||
#endif /* __OCF_CACHE_H__ */
|
||||
|
||||
@@ -356,6 +356,17 @@ struct ocf_mngt_cache_device_config {
|
||||
int ocf_mngt_cache_start(ocf_ctx_t ctx, ocf_cache_t *cache,
|
||||
struct ocf_mngt_cache_config *cfg);
|
||||
|
||||
/**
|
||||
* @brief Set queue to be used during management operations
|
||||
*
|
||||
* @param[in] cache Cache object
|
||||
* @param[in] queue Queue object
|
||||
*
|
||||
* @retval 0 Success
|
||||
* @retval Non-zero Error occurred
|
||||
*/
|
||||
int ocf_mngt_cache_set_mngt_queue(ocf_cache_t cache, ocf_queue_t queue);
|
||||
|
||||
/**
|
||||
* @brief Completion callback of cache stop operation
|
||||
*
|
||||
@@ -376,6 +387,19 @@ typedef void (*ocf_mngt_cache_stop_end_t)(ocf_cache_t cache,
|
||||
void ocf_mngt_cache_stop(ocf_cache_t cache,
|
||||
ocf_mngt_cache_stop_end_t cmpl, void *priv);
|
||||
|
||||
/**
|
||||
* @brief Get amount of free RAM needed to attach cache volume
|
||||
*
|
||||
* @param[in] cache Cache handle
|
||||
* @param[in] cfg Caching device configuration
|
||||
* @param[out] ram_needed Amount of RAM needed in bytes
|
||||
*
|
||||
* @retval 0 Success
|
||||
* @retval Non-zero Error occurred
|
||||
*/
|
||||
int ocf_mngt_get_ram_needed(ocf_cache_t cache,
|
||||
struct ocf_mngt_cache_device_config *cfg, uint64_t *ram_needed);
|
||||
|
||||
/**
|
||||
* @brief Completion callback of cache attach operation
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user