master - cache: set chunk_size as first param
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2d11fc695e7c2baff1b919fb9f92e491e49d5db1 Commit: 2d11fc695e7c2baff1b919fb9f92e491e49d5db1 Parent: 41843319654c671ce4419443a73f3cf87bb15199 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Mar 9 15:54:30 2017 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Mar 10 19:33:00 2017 +0100
cache: set chunk_size as first param
--- lib/metadata/cache_manip.c | 4 ++-- lib/metadata/lv_manip.c | 8 ++++---- lib/metadata/metadata-exported.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)
lib/metadata/cache_manip.c +2 -2
@@ -756,10 +756,10 @@ out:* to update all commonly specified cache parameters */ int cache_set_params (struct lv_segment *seg, +uint32_t chunk_size,cache_mode_t mode,const char *policy_name, -const struct dm_config_tree *policy_settings, -uint32_t chunk_size) +const struct dm_config_tree *policy_settings) {struct lv_segment *pool_seg;
lib/metadata/lv_manip.c +4 -4
@@ -7672,10 +7672,10 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,if (lv_is_cache_pool (lv)) {if (!cache_set_params (first_seg (lv), + lp->chunk_size, lp->cache_mode, lp->policy_name, - lp->policy_settings, - lp->chunk_size)) { + lp->policy_settings)) { stack; goto revert_new_lv; }
@@ -7881,10 +7881,10 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, lv = tmp_lv;if (!cache_set_params (first_seg (lv), + lp->chunk_size, lp->cache_mode, lp->policy_name, - lp->policy_settings, - (lp->passed_args &PASS_ARG_CHUNK_SIZE ) ? lp->chunk_size :0 )) + lp->policy_settings)) return_NULL;/* revert? */ cache_check_for_warns (first_seg (lv));
lib/metadata/metadata-exported.h +2 -2
@@ -1276,10 +1276,10 @@ int cache_set_cache_mode(struct lv_segment *cache_seg, cache_mode_t mode);int cache_set_policy (struct lv_segment *cache_seg,const char *name,const struct dm_config_tree *settings);int cache_set_params (struct lv_segment *seg, +uint32_t chunk_size,cache_mode_t mode,const char *policy_name, -const struct dm_config_tree *policy_settings, -uint32_t chunk_size); +const struct dm_config_tree *policy_settings);void cache_check_for_warns (const struct lv_segment *seg); int update_cache_pool_params(const struct segment_type *segtype, struct volume_group *vg, unsigned attr,