Merge pull request #284 from mmichal10/prevent-cache-name-duplicate
Prevent cache name duplicate
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -329,6 +330,8 @@ static void ocf_metadata_probe_cmpl(struct ocf_metadata_read_sb_ctx *context)
|
||||
status.clean_shutdown = (superblock->clean_shutdown !=
|
||||
ocf_metadata_dirty_shutdown);
|
||||
status.cache_dirty = (superblock->dirty_flushed == DIRTY_NOT_FLUSHED);
|
||||
env_strncpy(status.cache_name, OCF_CACHE_NAME_SIZE, superblock->name,
|
||||
OCF_CACHE_NAME_SIZE);
|
||||
|
||||
OCF_CMPL_RET(priv, 0, &status);
|
||||
}
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user