1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvresize: fix pvh handling

Fix bug in previous patch - if only PVs are specified -
it's like if user would have specified size.
This commit is contained in:
Zdenek Kabelac 2013-06-11 14:55:32 +02:00
parent 861fd1108f
commit 6ff8b6d754

View File

@ -458,7 +458,7 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
uint32_t size_rest;
uint32_t pv_extent_count;
alloc_policy_t alloc;
struct logical_volume *lock_lv;
struct logical_volume *lock_lv = NULL;
struct lv_list *lvl;
struct lv_segment *seg, *uninitialized_var(mirr_seg);
uint32_t seg_extents;
@ -575,7 +575,7 @@ static int _lvresize(struct cmd_context *cmd, struct volume_group *vg,
return ECMD_FAILED;
}
if (lp->sizeargs) { /* TODO: reindent or move to function */
if (lp->sizeargs || (pvh != &vg->pvs)) { /* TODO: reindent or move to function */
switch(lp->percent) {
case PERCENT_VG: