Store min and max ioclass size as percentage val

Min and max values, keept as an explicit number of cachelines, are tightly
coupled with particular cache. This might lead to errors and mismatches after
reattaching cache of different size.

To prevent those errors, min and max should be calculated dynamically.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2020-11-30 19:21:12 -05:00
parent bcfc821068
commit 0dc8b5811c
4 changed files with 47 additions and 19 deletions

View File

@@ -11,7 +11,7 @@
#define PARTITION_DEFAULT 0
#define PARTITION_INVALID ((ocf_part_id_t)-1)
#define PARTITION_SIZE_MAX ((ocf_cache_line_t)-1)
#define PARTITION_SIZE_MAX 100
static inline void ocf_metadata_get_partition_info(
struct ocf_cache *cache, ocf_cache_line_t line,