Remove cache id from public API

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2019-07-20 15:52:06 +02:00
parent 259df7ace9
commit 1100cb0b4f
9 changed files with 6 additions and 157 deletions

View File

@@ -100,15 +100,6 @@ struct ocf_cache_info {
*/
ocf_volume_t ocf_cache_get_volume(ocf_cache_t cache);
/**
* @brief Get ID of given cache object
*
* @param[in] cache Cache object
*
* @retval Cache ID
*/
ocf_cache_id_t ocf_cache_get_id(ocf_cache_t cache);
/**
* @brief Set name of given cache object
*

View File

@@ -84,22 +84,6 @@ uint32_t ocf_mngt_cache_get_count(ocf_ctx_t ctx);
/* Cache instances getters */
/**
* @brief Get OCF cache
*
* @note This function on success also increasing reference counter
* in given cache
*
* @param[in] ctx OCF context
* @param[in] id OCF cache ID
* @param[out] cache OCF cache handle
*
* @retval 0 Get cache successfully
* @retval -OCF_ERR_INV_CACHE_ID Cache ID out of range
* @retval -OCF_ERR_CACHE_NOT_EXIST Cache with given ID is not exist
*/
int ocf_mngt_cache_get_by_id(ocf_ctx_t ctx, ocf_cache_id_t id, ocf_cache_t *cache);
/**
* @brief Get OCF cache by name
*
@@ -255,12 +239,6 @@ int ocf_mngt_cache_visit_reverse(ocf_ctx_t ctx, ocf_mngt_cache_visitor_t visitor
* @brief Cache start configuration
*/
struct ocf_mngt_cache_config {
/**
* @brief Cache ID. In case of setting this field to invalid cache
* id first available cache ID will be set
*/
ocf_cache_id_t id;
/**
* @brief Cache name
*/
@@ -331,7 +309,6 @@ struct ocf_mngt_cache_config {
static inline void ocf_mngt_cache_config_set_default(
struct ocf_mngt_cache_config *cfg)
{
cfg->id = OCF_CACHE_ID_INVALID;
cfg->cache_mode = ocf_cache_mode_default;
cfg->eviction_policy = ocf_eviction_default;
cfg->promotion_policy = ocf_promotion_default;

View File

@@ -59,8 +59,8 @@ struct ocf_event_cache_desc {
/** Event header */
struct ocf_event_hdr hdr;
/** Cache Id */
ocf_cache_id_t id;
/** Cache name */
const char *name;
/** Cache line size */
ocf_cache_line_size_t cache_line_size;

View File

@@ -12,11 +12,6 @@
#include "ocf_env_headers.h"
/**
* @brief cache id type (by default designated as 16 bit unsigned integer)
*/
typedef uint16_t ocf_cache_id_t;
/**
* @brief cache line type (by default designated as 32 bit unsigned integer)
*/