Make CRC mismatch on recovery a warning instead of error
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
d946124a01
commit
d5ecdc16dd
@ -1293,11 +1293,17 @@ static void ocf_medatata_hash_check_crc_skip(ocf_pipeline_t pipeline,
|
||||
|
||||
if (crc != sb_config->checksum[segment]) {
|
||||
/* Checksum does not match */
|
||||
if (!sb_config->clean_shutdown) {
|
||||
ocf_cache_log(cache, log_warn,
|
||||
"Loading %s WARNING, invalid checksum",
|
||||
ocf_metadata_hash_raw_names[segment]);
|
||||
} else {
|
||||
ocf_cache_log(cache, log_err,
|
||||
"Loading %s ERROR, invalid checksum",
|
||||
ocf_metadata_hash_raw_names[segment]);
|
||||
OCF_PL_FINISH_RET(pipeline, -OCF_ERR_INVAL);
|
||||
}
|
||||
}
|
||||
|
||||
ocf_pipeline_next(pipeline);
|
||||
}
|
||||
|
@ -373,6 +373,7 @@ static int _ocf_mngt_init_instance_add_cores(
|
||||
ocf_core_id_t core_id;
|
||||
int ret = -1;
|
||||
uint64_t hd_lines = 0;
|
||||
uint64_t length;
|
||||
|
||||
OCF_ASSERT_PLUGGED(cache);
|
||||
|
||||
@ -439,8 +440,15 @@ static int _ocf_mngt_init_instance_add_cores(
|
||||
|
||||
ocf_core_seq_cutoff_init(core);
|
||||
|
||||
hd_lines = ocf_bytes_2_lines(cache,
|
||||
ocf_volume_get_length(&core->volume));
|
||||
length = ocf_volume_get_length(&core->volume);
|
||||
if (length != core->conf_meta->length) {
|
||||
ocf_cache_log(cache, log_err,
|
||||
"Size of core volume doesn't match with"
|
||||
" the size stored in cache metadata!");
|
||||
goto err;
|
||||
}
|
||||
|
||||
hd_lines = ocf_bytes_2_lines(cache, length);
|
||||
|
||||
if (hd_lines) {
|
||||
ocf_cache_log(cache, log_info,
|
||||
|
@ -279,7 +279,10 @@ static void ocf_mngt_cache_try_add_core_insert(ocf_pipeline_t pipeline,
|
||||
if (result)
|
||||
OCF_PL_FINISH_RET(pipeline, result);
|
||||
|
||||
if (!ocf_volume_get_length(volume)) {
|
||||
if (ocf_volume_get_length(volume) != core->conf_meta->length) {
|
||||
ocf_cache_log(cache, log_err,
|
||||
"Size of core volume doesn't match with"
|
||||
" the size stored in cache metadata!");
|
||||
result = -OCF_ERR_CORE_NOT_AVAIL;
|
||||
goto error_after_open;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user