summaryrefslogtreecommitdiffstats
path: root/tools/lvcreate.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2011-09-06 19:25:42 +0000
committerAlasdair Kergon <agk@redhat.com>2011-09-06 19:25:42 +0000
commitb88362ff95fa3e8f5be2ae359f3a859efbf3d694 (patch)
treedff6058b200cee0049f3a2b7a7c80cdbf2a4158c /tools/lvcreate.c
parent2ef5b7cca66314cdc0455a02a79713cc11e31ca2 (diff)
downloadlvm2-b88362ff95fa3e8f5be2ae359f3a859efbf3d694.tar.gz
lvm2-b88362ff95fa3e8f5be2ae359f3a859efbf3d694.tar.xz
lvm2-b88362ff95fa3e8f5be2ae359f3a859efbf3d694.zip
add thin_manip.c like the other manip files
move basic lv_is_* to macros data_lv -> pool_lv - we decided to call it 'pool' everywhere now
Diffstat (limited to 'tools/lvcreate.c')
-rw-r--r--tools/lvcreate.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index 6d6a7b98..e8722a3f 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -192,7 +192,6 @@ static int _determine_snapshot_type(struct volume_group *vg,
struct lvcreate_params *lp)
{
struct lv_list *lvl;
- struct lv_segment *seg;
if (!(lvl = find_lv_in_vg(vg, lp->origin))) {
log_error("Snapshot origin LV %s not found in Volume group %s.", lp->origin, vg->name);
@@ -200,12 +199,12 @@ static int _determine_snapshot_type(struct volume_group *vg,
}
/* FIXME Replace with lv_is_thin_volume() once more flags are added */
- if (seg_is_thin_volume(seg = first_seg(lvl->lv))) {
+ if (lv_is_thin_volume(lvl->lv)) {
lp->thin = 1;
if (!(lp->segtype = get_segtype_from_string(vg->cmd, "thin")))
return_0;
- lp->pool = seg->thin_pool_lv->name;
+ lp->pool = first_seg(lvl->lv)->thin_pool_lv->name;
}
if (!lp->thin && !arg_count(vg->cmd, extents_ARG) && !arg_count(vg->cmd, size_ARG)) {
@@ -804,8 +803,7 @@ static int _check_thin_parameters(struct volume_group *vg, struct lvcreate_param
log_error("Pool %s not found in Volume group %s.", lp->pool, vg->name);
return 0;
}
- /* FIXME Use lv_is_thin_pool() */
- if (!seg_is_thin_pool(first_seg(lvl->lv))) {
+ if (!lv_is_thin_pool(lvl->lv)) {
log_error("Logical volume %s is not a thin pool.", lp->pool);
return 0;
}