Fix removing clean inactive core
When removing core that's inactive, allow it without "--force" option if that core is clean. Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
parent
093501d4b6
commit
4c9465b3bf
@ -819,9 +819,12 @@ int _cache_mngt_remove_core_prepare(ocf_cache_t cache, ocf_core_t core,
|
|||||||
/* Flush core */
|
/* Flush core */
|
||||||
flush_result = _cache_mngt_core_flush_sync(core,
|
flush_result = _cache_mngt_core_flush_sync(core,
|
||||||
flush_interruptible);
|
flush_interruptible);
|
||||||
|
} else if (!ocf_mngt_core_is_dirty(core)) {
|
||||||
|
/* Clean core is always "flushed" */
|
||||||
|
flush_result = 0;
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_WARNING OCF_PREFIX_SHORT
|
printk(KERN_WARNING OCF_PREFIX_SHORT
|
||||||
"Cannot remove inactive core "
|
"Cannot remove dirty inactive core "
|
||||||
"without force option\n");
|
"without force option\n");
|
||||||
return -OCF_ERR_CORE_IN_INACTIVE_STATE;
|
return -OCF_ERR_CORE_IN_INACTIVE_STATE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user