Verify cache id duing the activate

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2022-02-17 15:02:03 +01:00
parent 6af8d20cee
commit 116676c18d

View File

@ -2416,6 +2416,13 @@ static void _ocf_mngt_activate_check_superblock(ocf_pipeline_t pipeline,
-OCF_ERR_CACHE_LINE_SIZE_MISMATCH);
}
if (env_strncmp(cache->conf_meta->name, OCF_CACHE_NAME_SIZE,
cache->name, OCF_CACHE_NAME_SIZE)) {
ocf_cache_log(cache, log_err, "Failed to activate standby instance: "
"cache name mismtach\n");
OCF_PL_FINISH_RET(context->pipeline, -OCF_ERR_CACHE_NAME_MISMATCH);
}
ocf_pipeline_next(pipeline);
}