Mark cache priv as inited during activate
Cache priv is being allocated on starting cache instance and is freed only when stopping cache. This cachnge allows to properly handle rollback if activate has failed. Without setting this flag managment queue is not being stopped despite its cache doesn't exist. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
parent
14b973ba11
commit
d9d8062f7c
@ -2352,6 +2352,9 @@ int cache_mngt_activate(struct ocf_mngt_cache_standby_activate_config *cfg,
|
|||||||
|
|
||||||
cache_priv = ocf_cache_get_priv(cache);
|
cache_priv = ocf_cache_get_priv(cache);
|
||||||
cache_priv->attach_context = context;
|
cache_priv->attach_context = context;
|
||||||
|
/* All the required memory has been alocated and initialized on cache_init,
|
||||||
|
* just set the flag to allow deinit*/
|
||||||
|
context->priv_inited = true;
|
||||||
|
|
||||||
context->rollback_thread = cas_lazy_thread_create(cache_start_rollback,
|
context->rollback_thread = cas_lazy_thread_create(cache_start_rollback,
|
||||||
context, "cas_cache_rollback_complete");
|
context, "cas_cache_rollback_complete");
|
||||||
|
Loading…
Reference in New Issue
Block a user