summaryrefslogtreecommitdiff
path: root/lib/format_pool
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-10-26 08:13:59 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2014-10-26 18:37:13 +0100
commitff2e8b0de6aafcf304b30e5f90501f3638ead22f (patch)
tree44cc26e56659a463aa5d2dd7740bf29d30b7a579 /lib/format_pool
parent52dfa6dd4491fd6f584b83d0924b82bea3bc1092 (diff)
downloadlvm2-ff2e8b0de6aafcf304b30e5f90501f3638ead22f.tar.gz
thin: simplify thin volume creation
Move code for creation of thin volume into a single place out of lv_extend(). This allows to drop extra pool arg for alloc_lv_segment() && lv_extend() and makes code more easier to read and follow.
Diffstat (limited to 'lib/format_pool')
-rw-r--r--lib/format_pool/import_export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/format_pool/import_export.c b/lib/format_pool/import_export.c
index 6ef075764..1aeabe248 100644
--- a/lib/format_pool/import_export.c
+++ b/lib/format_pool/import_export.c
@@ -194,7 +194,7 @@ static int _add_stripe_seg(struct dm_pool *mem,
if (!(seg = alloc_lv_segment(segtype, lv, *le_cur,
area_len * usp->num_devs, 0,
- usp->striping, NULL, NULL, usp->num_devs,
+ usp->striping, NULL, usp->num_devs,
area_len, 0, 0, 0, NULL))) {
log_error("Unable to allocate striped lv_segment structure");
return 0;
@@ -234,7 +234,7 @@ static int _add_linear_seg(struct dm_pool *mem,
if (!(seg = alloc_lv_segment(segtype, lv, *le_cur,
area_len, 0, usp->striping,
- NULL, NULL, 1, area_len,
+ NULL, 1, area_len,
POOL_PE_SIZE, 0, 0, NULL))) {
log_error("Unable to allocate linear lv_segment "
"structure");