Move parts metadata to separate section
Fix problem introduced by increasing partition name size to 1024 bytes, which effectively made superblock bigger than one page. Due to this flushing superblock required more than one io, which in case of dirty shutdown between these ios resulted in CRC missmatch and made cache recovery impossible. Moving parts metadata to separate sections makes superblock fitting in one page, effectively solving described problem. Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -958,7 +958,7 @@ static void _ocf_mngt_attach_prepare_metadata(ocf_pipeline_t pipeline,
|
||||
{
|
||||
struct ocf_cache_attach_context *context = priv;
|
||||
ocf_cache_t cache = context->cache;
|
||||
int ret, i;
|
||||
int ret;
|
||||
|
||||
if (context->init_mode == ocf_init_mode_load &&
|
||||
context->metadata.status) {
|
||||
@@ -986,11 +986,6 @@ static void _ocf_mngt_attach_prepare_metadata(ocf_pipeline_t pipeline,
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; i < OCF_IO_CLASS_MAX + 1; ++i) {
|
||||
cache->user_parts[i].runtime =
|
||||
&cache->device->runtime_meta->user_parts[i];
|
||||
}
|
||||
|
||||
cache->device->freelist_part = &cache->device->runtime_meta->freelist_part;
|
||||
|
||||
ret = ocf_concurrency_init(cache);
|
||||
@@ -1158,8 +1153,6 @@ static void _ocf_mngt_attach_handle_error(
|
||||
static void _ocf_mngt_cache_init(ocf_cache_t cache,
|
||||
struct ocf_cache_mngt_init_params *params)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Super block elements initialization
|
||||
*/
|
||||
@@ -1168,11 +1161,6 @@ static void _ocf_mngt_cache_init(ocf_cache_t cache,
|
||||
cache->conf_meta->promotion_policy_type =
|
||||
params->metadata.promotion_policy;
|
||||
|
||||
for (i = 0; i < OCF_IO_CLASS_MAX + 1; ++i) {
|
||||
cache->user_parts[i].config =
|
||||
&cache->conf_meta->user_parts[i];
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&cache->io_queues);
|
||||
|
||||
/* Init Partitions */
|
||||
|
Reference in New Issue
Block a user