Disallow ocf_cache_mode_max in io_class config
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
eccd4a0163
commit
5ad5c521df
@ -235,12 +235,8 @@ static int _ocf_mngt_io_class_validate_cfg(ocf_cache_t cache,
|
|||||||
if (!cfg->name)
|
if (!cfg->name)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* TODO(r.baldyga): ocf_cache_mode_max is allowed for compatibility
|
|
||||||
* with OCF 3.1 kernel adapter (upgrade in flight) and casadm.
|
|
||||||
* Forbid ocf_cache_mode_max after fixing these problems.
|
|
||||||
*/
|
|
||||||
if (cfg->cache_mode < ocf_cache_mode_none ||
|
if (cfg->cache_mode < ocf_cache_mode_none ||
|
||||||
cfg->cache_mode > ocf_cache_mode_max) {
|
cfg->cache_mode >= ocf_cache_mode_max) {
|
||||||
return -OCF_ERR_INVAL;
|
return -OCF_ERR_INVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user