Duplicate cache name in struct ocf_cache

Cache name is needed for logging in passive mode, when config metadata
is still not accessible.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2021-08-31 16:31:53 +02:00
parent 85e8b414c4
commit ee42d9aaaf
3 changed files with 11 additions and 2 deletions

View File

@@ -1012,7 +1012,7 @@ static void _ocf_mngt_load_read_properties_end(void *priv, int error,
/*
* Check if name loaded from disk is the same as present one.
*/
if (env_strncmp(cache->conf_meta->name, OCF_CACHE_NAME_SIZE,
if (env_strncmp(cache->name, OCF_CACHE_NAME_SIZE,
properties->cache_name, OCF_CACHE_NAME_SIZE)) {
OCF_PL_FINISH_RET(context->pipeline, -OCF_ERR_CACHE_NAME_MISMATCH);
}