Merge pull request #270 from imjfckm/pp-change-param-api
Pp change param api
This commit is contained in:
commit
af48ee56e3
@ -820,7 +820,7 @@ ocf_promotion_t ocf_mngt_cache_promotion_get_policy(ocf_cache_t cache);
|
||||
* @retval Non-zero Error occurred and parameter has not been set
|
||||
*/
|
||||
int ocf_mngt_cache_promotion_set_param(ocf_cache_t cache, uint8_t param_id,
|
||||
uint64_t param_value);
|
||||
uint32_t param_value);
|
||||
|
||||
/**
|
||||
* @brief Get promotion policy parameter for given cache
|
||||
@ -833,7 +833,7 @@ int ocf_mngt_cache_promotion_set_param(ocf_cache_t cache, uint8_t param_id,
|
||||
* @retval Non-zero Error occurred and parameter has not been retrieved
|
||||
*/
|
||||
int ocf_mngt_cache_promotion_get_param(ocf_cache_t cache, uint8_t param_id,
|
||||
uint64_t *param_value);
|
||||
uint32_t *param_value);
|
||||
|
||||
/**
|
||||
* @brief IO class configuration
|
||||
|
@ -2263,7 +2263,7 @@ ocf_promotion_t ocf_mngt_cache_promotion_get_policy(ocf_cache_t cache)
|
||||
}
|
||||
|
||||
int ocf_mngt_cache_promotion_get_param(ocf_cache_t cache, uint8_t param_id,
|
||||
uint64_t *param_value)
|
||||
uint32_t *param_value)
|
||||
{
|
||||
int result;
|
||||
|
||||
@ -2278,7 +2278,7 @@ int ocf_mngt_cache_promotion_get_param(ocf_cache_t cache, uint8_t param_id,
|
||||
}
|
||||
|
||||
int ocf_mngt_cache_promotion_set_param(ocf_cache_t cache, uint8_t param_id,
|
||||
uint64_t param_value)
|
||||
uint32_t param_value)
|
||||
{
|
||||
int result;
|
||||
|
||||
|
@ -64,7 +64,7 @@ void nhit_deinit(ocf_promotion_policy_t policy)
|
||||
}
|
||||
|
||||
ocf_error_t nhit_set_param(ocf_promotion_policy_t policy, uint8_t param_id,
|
||||
uint64_t param_value)
|
||||
uint32_t param_value)
|
||||
{
|
||||
struct nhit_policy_context *ctx = policy->ctx;
|
||||
ocf_error_t result = 0;
|
||||
@ -110,7 +110,7 @@ ocf_error_t nhit_set_param(ocf_promotion_policy_t policy, uint8_t param_id,
|
||||
}
|
||||
|
||||
ocf_error_t nhit_get_param(ocf_promotion_policy_t policy, uint8_t param_id,
|
||||
uint64_t *param_value)
|
||||
uint32_t *param_value)
|
||||
{
|
||||
struct nhit_policy_context *ctx = policy->ctx;
|
||||
ocf_error_t result = 0;
|
||||
|
@ -15,10 +15,10 @@ ocf_error_t nhit_init(ocf_cache_t cache, ocf_promotion_policy_t policy);
|
||||
void nhit_deinit(ocf_promotion_policy_t policy);
|
||||
|
||||
ocf_error_t nhit_set_param(ocf_promotion_policy_t policy, uint8_t param_id,
|
||||
uint64_t param_value);
|
||||
uint32_t param_value);
|
||||
|
||||
ocf_error_t nhit_get_param(ocf_promotion_policy_t policy, uint8_t param_id,
|
||||
uint64_t *param_value);
|
||||
uint32_t *param_value);
|
||||
|
||||
void nhit_req_purge(ocf_promotion_policy_t policy,
|
||||
struct ocf_request *req);
|
||||
|
@ -27,11 +27,11 @@ struct promotion_policy_ops {
|
||||
/*!< Deinit and free promotion policy */
|
||||
|
||||
ocf_error_t (*set_param)(ocf_promotion_policy_t policy, uint8_t param_id,
|
||||
uint64_t param_value);
|
||||
uint32_t param_value);
|
||||
/*!< Set promotion policy parameter */
|
||||
|
||||
ocf_error_t (*get_param)(ocf_promotion_policy_t policy, uint8_t param_id,
|
||||
uint64_t *param_value);
|
||||
uint32_t *param_value);
|
||||
/*!< Get promotion policy parameter */
|
||||
|
||||
void (*req_purge)(ocf_promotion_policy_t policy,
|
||||
|
@ -87,7 +87,7 @@ ocf_error_t ocf_promotion_set_policy(ocf_promotion_policy_t policy,
|
||||
}
|
||||
|
||||
ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
|
||||
uint8_t param_id, uint64_t param_value)
|
||||
uint8_t param_id, uint32_t param_value)
|
||||
{
|
||||
ocf_promotion_t type = policy->type;
|
||||
ocf_error_t result = -OCF_ERR_INVAL;
|
||||
@ -103,7 +103,7 @@ ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
|
||||
}
|
||||
|
||||
ocf_error_t ocf_promotion_get_param(ocf_promotion_policy_t policy,
|
||||
uint8_t param_id, uint64_t *param_value)
|
||||
uint8_t param_id, uint32_t *param_value)
|
||||
{
|
||||
ocf_promotion_t type = policy->type;
|
||||
ocf_error_t result = -OCF_ERR_INVAL;
|
||||
|
@ -51,7 +51,7 @@ ocf_error_t ocf_promotion_set_policy(ocf_promotion_policy_t policy,
|
||||
* @retval ocf_error_t
|
||||
*/
|
||||
ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
|
||||
uint8_t param_id, uint64_t param_value);
|
||||
uint8_t param_id, uint32_t param_value);
|
||||
|
||||
/**
|
||||
* @brief Get promotion policy parameter
|
||||
@ -63,7 +63,7 @@ ocf_error_t ocf_promotion_set_param(ocf_promotion_policy_t policy,
|
||||
* @retval ocf_error_t
|
||||
*/
|
||||
ocf_error_t ocf_promotion_get_param(ocf_promotion_policy_t policy,
|
||||
uint8_t param_id, uint64_t *param_value);
|
||||
uint8_t param_id, uint32_t *param_value);
|
||||
|
||||
/**
|
||||
* @brief Update promotion policy after cache lines have been promoted to cache
|
||||
|
Loading…
Reference in New Issue
Block a user