Merge pull request #341 from imjfckm/move-cls-init-after-attach
Move classifier init after cache device attach completion
This commit is contained in:
commit
c19249a471
@ -1650,6 +1650,13 @@ static void cache_start_finalize(struct work_struct *work)
|
|||||||
int result;
|
int result;
|
||||||
ocf_cache_t cache = ctx->cache;
|
ocf_cache_t cache = ctx->cache;
|
||||||
|
|
||||||
|
result = cas_cls_init(cache);
|
||||||
|
if (result) {
|
||||||
|
ctx->ocf_start_error = result;
|
||||||
|
return _cache_mngt_start_complete(cache, ctx, result);
|
||||||
|
}
|
||||||
|
ctx->cls_inited = true;
|
||||||
|
|
||||||
result = cache_mngt_initialize_core_objects(cache);
|
result = cache_mngt_initialize_core_objects(cache);
|
||||||
if (result) {
|
if (result) {
|
||||||
ctx->ocf_start_error = result;
|
ctx->ocf_start_error = result;
|
||||||
@ -1822,11 +1829,6 @@ static int _cache_mngt_start(struct ocf_mngt_cache_config *cfg,
|
|||||||
cache_priv = ocf_cache_get_priv(cache);
|
cache_priv = ocf_cache_get_priv(cache);
|
||||||
mngt_queue = cache_priv->mngt_queue;
|
mngt_queue = cache_priv->mngt_queue;
|
||||||
|
|
||||||
result = cas_cls_init(cache);
|
|
||||||
if (result)
|
|
||||||
goto err;
|
|
||||||
context->cls_inited = true;
|
|
||||||
|
|
||||||
if (load) {
|
if (load) {
|
||||||
ocf_mngt_cache_load(cache, device_cfg,
|
ocf_mngt_cache_load(cache, device_cfg,
|
||||||
_cache_mngt_start_complete, context);
|
_cache_mngt_start_complete, context);
|
||||||
|
Loading…
Reference in New Issue
Block a user