Avoid loading runtime metadata sections during recovery

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2021-12-29 09:10:51 +01:00
parent 4625763df5
commit 4cabc60d40
5 changed files with 86 additions and 34 deletions

View File

@@ -1443,8 +1443,13 @@ static void _ocf_mngt_load_superblock(ocf_pipeline_t pipeline,
ocf_cache_t cache = context->cache;
ocf_cache_log(cache, log_info, "Loading cache state...\n");
ocf_metadata_load_superblock(cache,
_ocf_mngt_load_superblock_complete, context);
if (context->metadata.shutdown_status == ocf_metadata_clean_shutdown) {
ocf_metadata_load_superblock(cache,
_ocf_mngt_load_superblock_complete, context);
} else {
ocf_metadata_load_superblock_recovery(cache,
_ocf_mngt_load_superblock_complete, context);
}
}
static void _ocf_mngt_init_cleaner(ocf_pipeline_t pipeline,