Don't remove core exported objects on standby stop
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
eae8bf92e5
commit
fb97333688
@ -2893,19 +2893,21 @@ int cache_mngt_exit_instance(const char *cache_name, size_t name_len, int flush)
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
/* Destroy cache devices */
|
||||
if (!ocf_cache_is_standby(cache)) {
|
||||
status = kcas_cache_destroy_all_core_exported_objects(cache);
|
||||
if (status != 0) {
|
||||
printk(KERN_WARNING
|
||||
"Failed to remove all cached devices\n");
|
||||
goto stop_thread;
|
||||
}
|
||||
} else {
|
||||
status = kcas_cache_destroy_exported_object(cache);
|
||||
if (status != 0) {
|
||||
printk(KERN_WARNING
|
||||
"Failed to remove cache exported object\n");
|
||||
goto stop_thread;
|
||||
}
|
||||
}
|
||||
|
||||
/* Flush cache again. This time we don't allow interruption. */
|
||||
if (flush && ocf_cache_is_running(cache))
|
||||
|
Loading…
Reference in New Issue
Block a user