Fix error message about not enough amount of RAM

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2022-03-22 09:21:10 +01:00
parent fdd50e61bd
commit 8a8420be2a
2 changed files with 3 additions and 2 deletions

View File

@ -1013,7 +1013,7 @@ int start_cache(uint16_t cache_id, unsigned int cache_init,
min_free_ram_gb /= GiB;
cas_printf(LOG_ERR, "Not enough free RAM.\n"
"You need at least %0.2gGB to start cache"
"You need at least %0.2fGB to start cache"
" with cache line size equal %llukB.\n",
min_free_ram_gb, line_size / KiB);

View File

@ -2540,7 +2540,6 @@ int cache_mngt_init_instance(struct ocf_mngt_cache_config *cfg,
strlcpy(cmd->cache_elevator, context->cache_elevator,
MAX_ELEVATOR_NAME);
cmd->min_free_ram = context->min_free_ram;
result = _cache_start_finalize(cache, cmd->init_cache, false);
if (result)
@ -2555,6 +2554,8 @@ int cache_mngt_init_instance(struct ocf_mngt_cache_config *cfg,
return result;
err:
cmd->min_free_ram = context->min_free_ram;
_cache_mngt_async_context_reinit(&context->async);
ocf_mngt_cache_stop(cache, _cache_mngt_cache_stop_rollback_complete,
context);