mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
raid: move VG update after archiving happened
Update of LV le_count needs to happen after archive().
This commit is contained in:
parent
ce199db848
commit
b2f1254c14
@ -1,5 +1,6 @@
|
||||
Version 2.02.178 -
|
||||
=====================================
|
||||
Do not modify archived metadata when removing striped raid.
|
||||
Fix memleak on error path when obtaining lv_raid_data_offset.
|
||||
Fix compatibility size test of extended external origin.
|
||||
Add external_origin visiting in for_each_sub_lv().
|
||||
|
@ -6077,13 +6077,6 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
is_last_pool = 1;
|
||||
}
|
||||
|
||||
/* Special case removing a striped raid LV with allocated reshape space */
|
||||
if (seg && seg->reshape_len) {
|
||||
if (!(seg->segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)))
|
||||
return_0;
|
||||
lv->le_count = seg->len = seg->area_len = seg_lv(seg, 0)->le_count * seg->area_count;
|
||||
}
|
||||
|
||||
/* Used cache pool, COW or historical LV cannot be activated */
|
||||
if (!lv_is_used_cache_pool(lv) &&
|
||||
!lv_is_cow(lv) && !lv_is_historical(lv) &&
|
||||
@ -6097,6 +6090,13 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
if (!archive(vg))
|
||||
return 0;
|
||||
|
||||
/* Special case removing a striped raid LV with allocated reshape space */
|
||||
if (seg && seg->reshape_len) {
|
||||
if (!(seg->segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)))
|
||||
return_0;
|
||||
lv->le_count = seg->len = seg->area_len = seg_lv(seg, 0)->le_count * seg->area_count;
|
||||
}
|
||||
|
||||
/* Clear thin pool stacked messages */
|
||||
if (pool_lv && !pool_has_message(first_seg(pool_lv), lv, 0) &&
|
||||
!update_pool_lv(pool_lv, 1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user