Fix removing cores from cleaning policy
After detaching a core if user wanted to remove inactive cores the cleaning policy data would not be initialized and would bug-out on next core add. This check was incorrect, as cleaning policy core metadata lifetime is not bound to core volume being open or not. Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
parent
7dcf90ef6a
commit
51455330ad
@ -41,11 +41,9 @@ void cache_mngt_core_remove_from_cleaning_pol(ocf_core_t core)
|
||||
ocf_metadata_start_exclusive_access(&cache->metadata.lock);
|
||||
|
||||
clean_pol_type = cache->conf_meta->cleaning_policy_type;
|
||||
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);
|
||||
}
|
||||
if (cleaning_policy_ops[clean_pol_type].remove_core) {
|
||||
cleaning_policy_ops[clean_pol_type].
|
||||
remove_core(cache, core_id);
|
||||
}
|
||||
|
||||
ocf_metadata_end_exclusive_access(&cache->metadata.lock);
|
||||
|
Loading…
Reference in New Issue
Block a user