1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

pvmove: add missing segment merging

When pvmove is finished and metadata are updated, the code missed
to merge possible mergable segments - so add explicit merging
call after pvmoved volumes are unlocked.

This avoids weird results where i.e. lvs could have been reporting
non-matching segments as lvs upon metadata read is doing silent segment
merging while dm table left after pvmove was still preserving
non-merged segments.
This commit is contained in:
Zdenek Kabelac 2017-11-29 22:19:46 +01:00
parent fbd8b456db
commit c489dd2e17
2 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.177 -
====================================
Merge segments when pvmove is finished.
Remove label_verify that has never been used.
Ensure very large numbers used as arguments are not casted to lower values.
Enhance reading and validation of options stripes and stripes_size.

View File

@ -6637,6 +6637,8 @@ int remove_layers_for_segments_all(struct cmd_context *cmd,
dm_list_iterate_items(lvl, lvs_changed) {
/* FIXME Assumes only one pvmove at a time! */
lvl->lv->status &= ~LOCKED;
if (!lv_merge_segments(lvl->lv))
return_0;
}
return 1;