From 5ad5c521df650ea8d12e38c7060f61f1ab8285b3 Mon Sep 17 00:00:00 2001 From: Robert Baldyga Date: Tue, 21 May 2019 09:33:33 +0200 Subject: [PATCH] Disallow ocf_cache_mode_max in io_class config Signed-off-by: Robert Baldyga --- src/mngt/ocf_mngt_io_class.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mngt/ocf_mngt_io_class.c b/src/mngt/ocf_mngt_io_class.c index 1f20890..22fb6c9 100644 --- a/src/mngt/ocf_mngt_io_class.c +++ b/src/mngt/ocf_mngt_io_class.c @@ -235,12 +235,8 @@ static int _ocf_mngt_io_class_validate_cfg(ocf_cache_t cache, if (!cfg->name) 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 || - cfg->cache_mode > ocf_cache_mode_max) { + cfg->cache_mode >= ocf_cache_mode_max) { return -OCF_ERR_INVAL; }