master - lvresize: Fix raid/mirror and %PE handling code.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0b3d0e79f694ac9dc5a29270b2f791a250980058 Commit: 0b3d0e79f694ac9dc5a29270b2f791a250980058 Parent: 7e208d65043118907ff657c30f1423e96911fbbe Author: Alasdair G Kergon <[email protected]> AuthorDate: Fri Aug 22 01:26:14 2014 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Fri Aug 22 01:26:14 2014 +0100
lvresize: Fix raid/mirror and %PE handling code.
Sort out the lvresize calculation code to handle size changes specified as physical extents as well as logical extents and to process mirror resizing and raid extensions correctly.
The 'approx alloc' option was masking the underlying problem.
--- WHATS_NEW | 1 + lib/display/display.c | 2 +- lib/metadata/lv_manip.c | 502 +++++++++++++++++++++++--------------- lib/metadata/metadata-exported.h | 1 + 4 files changed, 311 insertions(+), 195 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.110 - ================================== + Modify lvresize code to handle raid/mirrors and physical extents. Allow conversion of raid1 LV into a snapshot LV or snapshot origin LV. Cleanly error when creating RAID with stripe size < PAGE_SIZE. Print name of LV which on activation triggers delayed snapshot merge.
lib/display/display.c +1 -1
@@ -86,7 +86,7 @@ alloc_policy_t get_alloc_from_string(const char *str)return ALLOC_INVALID ; } -static const char *_percent_types[7 ] = {"NONE" ,"VGS" ,"FREE" ,"LVS" ,"PVS" ,"ORIGIN" }; +static const char *_percent_types[7 ] = {"NONE" ,"VG" ,"FREE" ,"LV" ,"PVS" ,"ORIGIN" };const char *get_percent_string (percent_type_t def) {
lib/metadata/lv_manip.c +308 -194
746 lines not on this page · raw message
lib/metadata/metadata-exported.h +1 -0
@@ -494,6 +494,7 @@ struct lvresize_params {sign_t poolmetadatasign;uint32_t poolmetadataextents;int approx_alloc; +int extents_are_pes;/* Is 'extents' counting PEs or LEs? */ percent_type_t percent;enum {