From aec01f216c1390f5abd8963677715767bb57886d Mon Sep 17 00:00:00 2001 From: Jan Musial Date: Fri, 14 Jun 2019 14:00:23 +0200 Subject: [PATCH] Revert "Disallow ocf_cache_mode_max in io_class config" This reverts commit 5ad5c521df650ea8d12e38c7060f61f1ab8285b3. This change broke setting IO-classes with allocation. We use max as a special value to indicate that the partition should use cache global caching mode. --- src/mngt/ocf_mngt_io_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mngt/ocf_mngt_io_class.c b/src/mngt/ocf_mngt_io_class.c index 22fb6c9..0aa1888 100644 --- a/src/mngt/ocf_mngt_io_class.c +++ b/src/mngt/ocf_mngt_io_class.c @@ -236,7 +236,7 @@ static int _ocf_mngt_io_class_validate_cfg(ocf_cache_t cache, return 0; 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; }