mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-17 06:04:23 +03:00
raid: add missing archive call
Before starting to update raid metadata, archive existing unmodified one.
This commit is contained in:
parent
569184a3bb
commit
08bde75093
@ -1,5 +1,6 @@
|
||||
Version 2.02.112 -
|
||||
=====================================
|
||||
Archive metadata before starting their modification in raid target.
|
||||
Add missing vg_revert in suspend_lv() error path in raid target.
|
||||
Add missing backup of lvm2 metadata after some raid modifications.
|
||||
Use vg memory pool for extent allocation.
|
||||
|
@ -520,6 +520,9 @@ static int _raid_add_images(struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!archive(lv->vg))
|
||||
return_0;
|
||||
|
||||
dm_list_init(&meta_lvs); /* For image addition */
|
||||
dm_list_init(&data_lvs); /* For image addition */
|
||||
|
||||
@ -909,6 +912,9 @@ static int _raid_remove_images(struct logical_volume *lv,
|
||||
struct dm_list removal_list;
|
||||
struct lv_list *lvl;
|
||||
|
||||
if (!archive(lv->vg))
|
||||
return_0;
|
||||
|
||||
dm_list_init(&removal_list);
|
||||
|
||||
if (!_raid_extract_images(lv, new_count, pvs, 1,
|
||||
@ -1313,6 +1319,9 @@ static int _convert_mirror_to_raid1(struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!archive(lv->vg))
|
||||
return_0;
|
||||
|
||||
for (s = 0; s < seg->area_count; s++) {
|
||||
log_debug_metadata("Allocating new metadata LV for %s",
|
||||
seg_lv(seg, s)->name);
|
||||
@ -1543,6 +1552,9 @@ int lv_raid_replace(struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!archive(lv->vg))
|
||||
return_0;
|
||||
|
||||
/*
|
||||
* How many sub-LVs are being removed?
|
||||
*/
|
||||
@ -1767,6 +1779,9 @@ int lv_raid_remove_missing(struct logical_volume *lv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!archive(lv->vg))
|
||||
return_0;
|
||||
|
||||
log_debug("Attempting to remove missing devices from %s LV, %s",
|
||||
seg->segtype->ops->name(seg), lv->name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user