Initialize promotion policy on cache attach.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2019-09-30 10:10:02 -04:00
parent dfc55538ce
commit e16d4e6dda
10 changed files with 115 additions and 99 deletions

View File

@@ -255,7 +255,7 @@ class Cache:
param_value = c_uint64()
status = self.owner.lib.ocf_mngt_cache_promotion_get_param(
self.cache_handle, param_id, promotion_type, byref(param_value)
self.cache_handle, promotion_type, param_id, byref(param_value)
)
self.read_unlock()
@@ -264,11 +264,11 @@ class Cache:
return param_value
def set_promotion_policy_param(self, param_id, promotion_type, param_value):
def set_promotion_policy_param(self, promotion_type, param_id, param_value):
self.write_lock()
status = self.owner.lib.ocf_mngt_cache_promotion_set_param(
self.cache_handle, param_id, promotion_type, param_value
self.cache_handle, promotion_type, param_id, param_value
)
self.write_unlock()