From c756f7680202f0a59dea917527e95f68c7a9af4b Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 4 Oct 2019 14:59:25 +0200 Subject: [PATCH] vdo: correct internal API for set_vdo_write_policy This is 'setting' function. --- lib/metadata/metadata-exported.h | 2 +- lib/metadata/vdo_manip.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h index ea8635e3f..081e9a593 100644 --- a/lib/metadata/metadata-exported.h +++ b/lib/metadata/metadata-exported.h @@ -1308,7 +1308,7 @@ int parse_vdo_pool_status(struct dm_pool *mem, const struct logical_volume *vdo_ struct logical_volume *convert_vdo_pool_lv(struct logical_volume *data_lv, const struct dm_vdo_target_params *vtp, uint32_t *virtual_extents); -int get_vdo_write_policy(enum dm_vdo_write_policy *vwp, const char *policy); +int set_vdo_write_policy(enum dm_vdo_write_policy *vwp, const char *policy); int fill_vdo_target_params(struct cmd_context *cmd, struct dm_vdo_target_params *vtp, struct profile *profile); diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c index 4877e77d6..7ed3ef97b 100644 --- a/lib/metadata/vdo_manip.c +++ b/lib/metadata/vdo_manip.c @@ -404,7 +404,7 @@ struct logical_volume *convert_vdo_pool_lv(struct logical_volume *data_lv, return data_lv; } -int get_vdo_write_policy(enum dm_vdo_write_policy *vwp, const char *policy) +int set_vdo_write_policy(enum dm_vdo_write_policy *vwp, const char *policy) { if (strcasecmp(policy, "sync") == 0) *vwp = DM_VDO_WRITE_POLICY_SYNC; @@ -467,7 +467,7 @@ int fill_vdo_target_params(struct cmd_context *cmd, find_config_tree_int(cmd, allocation_vdo_max_discard_CFG, profile); policy = find_config_tree_str(cmd, allocation_vdo_write_policy_CFG, profile); - if (!get_vdo_write_policy(&vtp->write_policy, policy)) + if (!set_vdo_write_policy(&vtp->write_policy, policy)) return_0; return 1;