Change cacheline concurrency constructor params

Provide number of cachelines as the cacheline concurrency
construtor param instead of reading it from cache.

The purpose of this change is to improve testability.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2021-02-24 17:29:45 -06:00
parent cf5f82b253
commit c7fc4fff39
3 changed files with 7 additions and 7 deletions

View File

@@ -4,6 +4,7 @@
*/
#include "ocf_concurrency.h"
#include "../metadata/metadata.h"
int ocf_concurrency_init(struct ocf_cache *cache)
{
@@ -11,6 +12,7 @@ int ocf_concurrency_init(struct ocf_cache *cache)
result = ocf_cache_line_concurrency_init(
&cache->device->concurrency.cache_line,
ocf_metadata_collision_table_entries(cache),
cache);
if (result)
@@ -23,6 +25,5 @@ void ocf_concurrency_deinit(struct ocf_cache *cache)
{
ocf_cache_line_concurrency_deinit(
&cache->device->concurrency.cache_line);
}