master - lvresize: fix pvh handling
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6ff8b6d7548b218f678c45f768b8383038db1855 Commit: 6ff8b6d7548b218f678c45f768b8383038db1855 Parent: 861fd1108f4873f549c1e1b852243edcf03493d9 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Jun 11 14:55:32 2013 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Jun 11 14:55:32 2013 +0200
lvresize: fix pvh handling
Fix bug in previous patch - if only PVs are specified - it's like if user would have specified size.
--- tools/lvresize.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
tools/lvresize.c +2 -2
@@ -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 :