Unify core naming convention (core_obj -> core)
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
/* Close if opened */
|
||||
int cache_mng_core_close(ocf_cache_t cache, ocf_core_id_t core_id)
|
||||
{
|
||||
if (!cache->core_obj[core_id].opened)
|
||||
if (!cache->core[core_id].opened)
|
||||
return -OCF_ERR_CORE_IN_INACTIVE_STATE;
|
||||
|
||||
ocf_data_obj_close(&cache->core_obj[core_id].obj);
|
||||
cache->core_obj[core_id].opened = false;
|
||||
ocf_data_obj_close(&cache->core[core_id].obj);
|
||||
cache->core[core_id].opened = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ void cache_mng_core_remove_from_cleaning_pol(struct ocf_cache *cache,
|
||||
OCF_METADATA_LOCK_WR();
|
||||
|
||||
clean_pol_type = cache->conf_meta->cleaning_policy_type;
|
||||
if (cache->core_obj[core_id].opened) {
|
||||
if (cache->core[core_id].opened) {
|
||||
if (cleaning_policy_ops[clean_pol_type].remove_core) {
|
||||
cleaning_policy_ops[clean_pol_type].
|
||||
remove_core(cache, core_id);
|
||||
@@ -55,7 +55,7 @@ void cache_mng_core_deinit_attached_meta(struct ocf_cache *cache, int core_id)
|
||||
ocf_cleaning_t clean_pol_type;
|
||||
ocf_data_obj_t core;
|
||||
|
||||
core = &cache->core_obj[core_id].obj;
|
||||
core = &cache->core[core_id].obj;
|
||||
|
||||
core_size = ocf_data_obj_get_length(core);
|
||||
if (!core_size)
|
||||
@@ -96,7 +96,7 @@ void cache_mng_core_remove_from_meta(struct ocf_cache *cache, int core_id)
|
||||
cache->core_conf_meta[core_id].added = false;
|
||||
|
||||
/* Clear UUID of core */
|
||||
ocf_uuid_core_clear(cache, &cache->core_obj[core_id]);
|
||||
ocf_uuid_core_clear(cache, &cache->core[core_id]);
|
||||
cache->core_conf_meta[core_id].seq_no = OCF_SEQ_NO_INVALID;
|
||||
|
||||
OCF_METADATA_UNLOCK_WR();
|
||||
@@ -105,16 +105,16 @@ void cache_mng_core_remove_from_meta(struct ocf_cache *cache, int core_id)
|
||||
/* Deinit in-memory structures related to this core */
|
||||
void cache_mng_core_remove_from_cache(struct ocf_cache *cache, int core_id)
|
||||
{
|
||||
env_free(cache->core_obj[core_id].counters);
|
||||
cache->core_obj[core_id].counters = NULL;
|
||||
env_free(cache->core[core_id].counters);
|
||||
cache->core[core_id].counters = NULL;
|
||||
env_bit_clear(core_id, cache->conf_meta->valid_object_bitmap);
|
||||
|
||||
if (!cache->core_obj[core_id].opened &&
|
||||
if (!cache->core[core_id].opened &&
|
||||
--cache->ocf_core_inactive_count == 0) {
|
||||
env_bit_clear(ocf_cache_state_incomplete, &cache->cache_state);
|
||||
}
|
||||
|
||||
cache->conf_meta->core_obj_count--;
|
||||
cache->conf_meta->core_count--;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user