Merge pull request #371 from Ostrokrzew/load
Disable loading cache with 'force' flag
This commit is contained in:
commit
1428376554
@ -2075,7 +2075,14 @@ void ocf_mngt_cache_load(ocf_cache_t cache,
|
||||
|
||||
/* Load is not allowed in volatile metadata mode */
|
||||
if (cache->metadata.is_volatile)
|
||||
OCF_CMPL_RET(cache, priv, -EINVAL);
|
||||
OCF_CMPL_RET(cache, priv, -OCF_ERR_INVAL);
|
||||
|
||||
/* Load is not allowed with 'force' flag on */
|
||||
if (cfg->force) {
|
||||
ocf_cache_log(cache, log_err, "Using 'force' flag is forbidden "
|
||||
"for load operation.");
|
||||
OCF_CMPL_RET(cache, priv, -OCF_ERR_INVAL);
|
||||
}
|
||||
|
||||
result = _ocf_mngt_cache_validate_device_cfg(cfg);
|
||||
if (result)
|
||||
|
Loading…
Reference in New Issue
Block a user