Check if loaded cache name is valid.

When loading cache, it's name should be the same as the loaded one.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-09-19 19:13:27 -04:00
parent d332c9d97f
commit c04ea4898f
3 changed files with 10 additions and 1 deletions

View File

@@ -290,6 +290,7 @@ static void ocf_metadata_load_properties_cmpl(
properties.cache_mode = superblock->cache_mode;
properties.shutdown_status = superblock->clean_shutdown;
properties.dirty_flushed = superblock->dirty_flushed;
properties.cache_name = superblock->name;
OCF_CMPL_RET(priv, 0, &properties);
}

View File

@@ -206,6 +206,7 @@ struct ocf_metadata_load_properties {
ocf_metadata_layout_t layout;
ocf_cache_line_size_t line_size;
ocf_cache_mode_t cache_mode;
char *cache_name;
};
typedef void (*ocf_metadata_load_properties_end_t)(void *priv, int error,