1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

Thin create normal (old) snapshot when size is specified

This commit is contained in:
Zdenek Kabelac 2011-11-10 12:39:46 +00:00
parent 74e53e8bc0
commit 95308c5f58

View File

@ -204,7 +204,12 @@ static int _determine_snapshot_type(struct volume_group *vg,
return 0; return 0;
} }
if (lv_is_thin_volume(lvl->lv)) { if (!arg_count(vg->cmd, extents_ARG) && !arg_count(vg->cmd, size_ARG)) {
if (!lv_is_thin_volume(lvl->lv)) {
log_error("Please specify either size or extents with snapshots.");
return 0;
}
lp->thin = 1; lp->thin = 1;
if (!(lp->segtype = get_segtype_from_string(vg->cmd, "thin"))) if (!(lp->segtype = get_segtype_from_string(vg->cmd, "thin")))
return_0; return_0;
@ -212,11 +217,6 @@ static int _determine_snapshot_type(struct volume_group *vg,
lp->pool = first_seg(lvl->lv)->pool_lv->name; lp->pool = first_seg(lvl->lv)->pool_lv->name;
} }
if (!lp->thin && !arg_count(vg->cmd, extents_ARG) && !arg_count(vg->cmd, size_ARG)) {
log_error("Please specify either size or extents with snapshots.");
return 0;
}
return 1; return 1;
} }