Merge pull request #753 from arutk/mlpvf
Add missing ocf_metadata_read_sb error handling
This commit is contained in:
commit
990d7b9c6e
@ -1650,6 +1650,9 @@ static void ocf_metadata_load_properties_cmpl(
|
||||
ocf_ctx_t ctx = context->ctx;
|
||||
int result;
|
||||
|
||||
if (context->error)
|
||||
OCF_CMPL_RET(priv, context->error, NULL);
|
||||
|
||||
result = ocf_metadata_validate_superblock(ctx, superblock);
|
||||
if (result)
|
||||
OCF_CMPL_RET(priv, result, NULL);
|
||||
@ -1694,6 +1697,9 @@ static void ocf_metadata_probe_cmpl(struct ocf_metadata_read_sb_ctx *context)
|
||||
ocf_metadata_probe_end_t cmpl = context->priv1;
|
||||
void *priv = context->priv2;
|
||||
|
||||
if (context->error)
|
||||
OCF_CMPL_RET(priv, context->error, NULL);
|
||||
|
||||
if (superblock->magic_number != CACHE_MAGIC_NUMBER)
|
||||
OCF_CMPL_RET(priv, -OCF_ERR_NO_METADATA, NULL);
|
||||
|
||||
|
@ -2335,6 +2335,9 @@ static void _ocf_mngt_activate_compare_superblock_end(
|
||||
ocf_cache_t cache = context->cache;
|
||||
int result, diff;
|
||||
|
||||
if (sb_ctx->error)
|
||||
OCF_PL_FINISH_RET(context->pipeline, sb_ctx->error);
|
||||
|
||||
result = env_memcmp(cache->conf_meta, sizeof(*cache->conf_meta),
|
||||
superblock, sizeof(*superblock), &diff);
|
||||
if (result)
|
||||
|
Loading…
Reference in New Issue
Block a user