Merge pull request #489 from Open-CAS/fix-removing-acp-cores

Fix removing cores from cleaning policy
This commit is contained in:
Michał Mielewczyk 2021-04-14 16:58:46 +02:00 committed by GitHub
commit 467dfed51e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -666,6 +666,7 @@ void cleaning_policy_acp_remove_core(ocf_cache_t cache,
uint64_t i;
ENV_BUG_ON(acp->chunks_total < acp->num_chunks[core_id]);
ENV_BUG_ON(!acp->chunk_info[core_id]);
if (acp->state.in_progress && acp->state.chunk->core_id == core_id) {
acp->state.in_progress = false;

View File

@ -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);