mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
metadata: Add pvs_outdated to struct volume_group.
This is a list of PVs that should have their MDAs wiped because they carry outdated metadata (that used to belong to the VG they are attached to).
This commit is contained in:
parent
5435346052
commit
611c8b6d29
@ -3307,6 +3307,9 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
|
||||
*consistent = _repair_inconsistent_vg(correct_vg);
|
||||
else
|
||||
*consistent = !reappeared;
|
||||
if (_wipe_outdated_pvs(cmd, correct_vg, &correct_vg->pvs_outdated))
|
||||
/* clear the list */
|
||||
dm_list_init(&correct_vg->pvs_outdated);
|
||||
}
|
||||
return correct_vg;
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ struct volume_group *alloc_vg(const char *pool_name, struct cmd_context *cmd,
|
||||
|
||||
dm_list_init(&vg->pvs);
|
||||
dm_list_init(&vg->pvs_to_create);
|
||||
dm_list_init(&vg->pvs_outdated);
|
||||
dm_list_init(&vg->lvs);
|
||||
dm_list_init(&vg->tags);
|
||||
dm_list_init(&vg->removed_lvs);
|
||||
|
@ -90,6 +90,13 @@ struct volume_group {
|
||||
|
||||
struct dm_list pvs_to_create;
|
||||
|
||||
/*
|
||||
* List of physical volumes that carry outdated metadata that belongs
|
||||
* to this VG. Currently only populated when lvmetad is in use.
|
||||
*/
|
||||
|
||||
struct dm_list pvs_outdated;
|
||||
|
||||
/*
|
||||
* logical volumes
|
||||
* The following relationship should always hold:
|
||||
|
Loading…
Reference in New Issue
Block a user