master - pvvmove: add a few comments
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f29ae59a4d88ff0f76cfd84a6061222ae178438b Commit: f29ae59a4d88ff0f76cfd84a6061222ae178438b Parent: f96a499c8d4ad784ccd7a15061e71b16342de104 Author: Alasdair G Kergon <[email protected]> AuthorDate: Fri Jun 20 11:41:20 2014 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Fri Jun 20 11:41:20 2014 +0100
pvvmove: add a few comments
--- lib/metadata/lv_manip.c | 8 +++++--- lib/metadata/merge.c | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-)
lib/metadata/lv_manip.c +5 -3
@@ -2737,8 +2737,9 @@ int lv_add_segmented_mirror_image(struct alloc_handle *ah, }/* -* Perform any necessary segment splitting before creating -* the mirror layer. +* If the allocator provided two or more PV allocations for any +* single segment of the original LV, that LV segment must be +* split up to match. */ dm_list_iterate_items(aa, &ah->alloced_areas[0]) {if (!(seg =find_seg_by_le (lv, current_le))) {
@@ -2757,6 +2758,7 @@ int lv_add_segmented_mirror_image(struct alloc_handle *ah, } current_le += seg->area_len; } + current_le = le;if (!insert_layer_for_lv (lv->vg->cmd, lv,PVMOVE ,"_mimage_0" )) {
@@ -5222,7 +5224,7 @@ int remove_layers_for_segments(struct cmd_context *cmd, layer_lv->name, lseg->le);return 0 ; } -if (((lseg->status & status_mask) != status_mask)) { +if ((lseg->status & status_mask) != status_mask) { log_error("Layer status does not match: " "%s:%" PRIu32 " status: 0x%" PRIx64 "/0x%" PRIx64, layer_lv->name, lseg->le,
lib/metadata/merge.c +5 -0
@@ -40,6 +40,11 @@ int lv_merge_segments(struct logical_volume *lv)struct dm_list *segh, *t;struct lv_segment *seg, *current, *prev =NULL ; +/* +* Don't interfere with pvmoves as they rely upon two LVs +* having a matching segment structure. +*/ +if (lv->status &LOCKED || lv->status &PVMOVE )return 1 ;