Store cache name in metadata
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -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,
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user