Store cache name in metadata

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2019-07-20 14:32:58 +02:00
parent b73b2857dd
commit eb4272afa9
5 changed files with 28 additions and 26 deletions

View File

@@ -32,18 +32,16 @@ int ocf_metadata_init(struct ocf_cache *cache,
ENV_BUG_ON(cache->metadata.iface_priv);
ret = ocf_metadata_io_init(cache);
if (ret)
return ret;
*iface = *metadata_hash_get_iface();
ret = cache->metadata.iface.init(cache, cache_line_size);
if (ret)
if (ret) {
ocf_metadata_io_deinit(cache);
return ret;
}
ocf_metadata_concurrency_init(cache);
return ret;
return 0;
}
int ocf_metadata_init_variable_size(struct ocf_cache *cache, uint64_t device_size,

View File

@@ -6,6 +6,7 @@
#ifndef __METADATA_SUPERBLOCK_H__
#define __METADATA_SUPERBLOCK_H__
#include <ocf/ocf_def.h>
#include <ocf/ocf_def.h>
#define CACHE_MAGIC_NUMBER 0x187E1CA6
@@ -26,6 +27,8 @@ struct ocf_superblock_config {
/* Currently set cache mode */
ocf_cache_mode_t cache_mode;
char name[OCF_CACHE_NAME_SIZE];
ocf_cache_line_t cachelines;
uint32_t valid_parts_no;