Merge pull request #121 from micrakow/seq_cutoff_policy_check
Added seq_cutoff_policy check
This commit is contained in:
commit
057777e91d
@ -1699,6 +1699,9 @@ static int _ocf_mngt_cache_validate_cfg(struct ocf_mngt_cache_config *cfg)
|
||||
return -OCF_ERR_INVAL;
|
||||
}
|
||||
|
||||
if (cfg->backfill.queue_unblock_size > cfg->backfill.max_queue_size )
|
||||
return -OCF_ERR_INVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -905,6 +905,12 @@ static int _cache_mng_set_core_seq_cutoff_policy(ocf_core_t core, void *cntx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (policy < 0 || policy >= ocf_seq_cutoff_policy_max) {
|
||||
ocf_core_log(core, log_info,
|
||||
"Wrong sequential cutoff policy!\n");
|
||||
return -OCF_ERR_INVAL;
|
||||
}
|
||||
|
||||
cache->core_conf_meta[core_id].seq_cutoff_policy = policy;
|
||||
|
||||
ocf_core_log(core, log_info,
|
||||
|
Loading…
Reference in New Issue
Block a user