seq_cutoff: Allocate seq cutoff structures dynamically per core

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2020-12-04 18:23:58 +01:00
committed by Adam Rutkowski
parent 0fd095046c
commit ac83c4ecd6
5 changed files with 55 additions and 30 deletions

View File

@@ -352,6 +352,9 @@ static void _ocf_mngt_close_all_uninitialized_cores(
--j;
if (cache->core[i].seq_cutoff)
ocf_core_seq_cutoff_deinit(&cache->core[i]);
env_free(cache->core[i].counters);
cache->core[i].counters = NULL;
@@ -438,7 +441,9 @@ static int _ocf_mngt_init_instance_add_cores(
continue;
}
ocf_core_seq_cutoff_init(core);
ret = ocf_core_seq_cutoff_init(core);
if (ret < 0)
goto err;
length = ocf_volume_get_length(&core->volume);
if (length != core->conf_meta->length) {