master - lvconvert: Refactor argument handling code.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=dfc516f9bfd35ec36c60165bd319a9b0008764a3 Commit: dfc516f9bfd35ec36c60165bd319a9b0008764a3 Parent: 7e671e5dd0af699244902d5ce71a7159253c9e2b Author: Alasdair G Kergon <[email protected]> AuthorDate: Wed Jun 22 18:40:22 2016 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Wed Jun 22 18:40:22 2016 +0100
lvconvert: Refactor argument handling code.
Begin disentangling the different lvconvert modes of operation from each other.
--- WHATS_NEW | 1 + lib/metadata/metadata-exported.h | 9 +- lib/metadata/raid_manip.c | 9 +- tools/lvconvert.c | 294 ++++++++++++++++++++++++------------- 4 files changed, 206 insertions(+), 107 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.158 - ================================= + Refactor lvconvert argument handling code. Add --logonly option to report only cmd log for a command, not other reports. Add log/command_log_selection to configure default selection used on cmd log. Use 'orphan' object type in cmd log for groups to collect PVs not yet in VGs.
lib/metadata/metadata-exported.h +7 -2
@@ -1202,8 +1202,13 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name,int lv_raid_split_and_track (struct logical_volume *lv,struct dm_list *splittable_pvs);int lv_raid_merge (struct logical_volume *lv); -int lv_raid_reshape (struct logical_volume *lv, -const struct segment_type *new_segtype); +int lv_raid_convert (struct logical_volume *lv, +const struct segment_type *new_segtype, +int yes,int force, +const unsigned image_count, +const unsigned stripes, +const unsigned new_stripe_size, +struct dm_list *allocate_pvs);int lv_raid_replace (struct logical_volume *lv,struct dm_list *remove_pvs,struct dm_list *allocate_pvs);int lv_raid_remove_missing (struct logical_volume *lv);
lib/metadata/raid_manip.c +7 -2
@@ -1469,8 +1469,13 @@ static int _convert_mirror_to_raid1(struct logical_volume *lv,* * Returns: 1 on success, 0 on failure */ -int lv_raid_reshape (struct logical_volume *lv, -const struct segment_type *new_segtype) +int lv_raid_convert (struct logical_volume *lv, +const struct segment_type *new_segtype, +int yes,int force, +unsigned new_image_count, +const unsigned new_stripes, +const unsigned new_stripe_size, +struct dm_list *allocate_pvs) {struct lv_segment *seg =first_seg (lv);
tools/lvconvert.c +191 -103
582 lines not on this page · raw message