mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-19 14:04:17 +03:00
Code move of vg_mark_partial() up in stack
It's useful to keep the partial flag cached - so just move the call for vg_mark_partil_lvs() into import_vg_from_config_tree() so it gets evaluated before it goes through the lvmcache. This patch should not present any functional change. Note: It is rather temporal solution - proper place is probably inside the 'read' call back - but needs some more discussion. For now using this minor hack.
This commit is contained in:
parent
93a98c2672
commit
bebe60b70c
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.86 -
|
Version 2.02.86 -
|
||||||
=================================
|
=================================
|
||||||
|
Call vg_mark_partial_lvs() before VG structure is returned from the cache.
|
||||||
Remove unused internal flag ACTIVATE_EXCL from the code.
|
Remove unused internal flag ACTIVATE_EXCL from the code.
|
||||||
Remove useless test of ACTIVATE_EXCL in lv_add_mirrors() clustered code path.
|
Remove useless test of ACTIVATE_EXCL in lv_add_mirrors() clustered code path.
|
||||||
Use lv_activate_opts struct instead of MERGING status flag.
|
Use lv_activate_opts struct instead of MERGING status flag.
|
||||||
|
@ -136,6 +136,7 @@ struct volume_group *import_vg_from_config_tree(const struct config_tree *cft,
|
|||||||
{
|
{
|
||||||
struct volume_group *vg = NULL;
|
struct volume_group *vg = NULL;
|
||||||
struct text_vg_version_ops **vsn;
|
struct text_vg_version_ops **vsn;
|
||||||
|
int vg_missing;
|
||||||
|
|
||||||
_init_text_import();
|
_init_text_import();
|
||||||
|
|
||||||
@ -148,6 +149,12 @@ struct volume_group *import_vg_from_config_tree(const struct config_tree *cft,
|
|||||||
*/
|
*/
|
||||||
if (!(vg = (*vsn)->read_vg(fid, cft, 1)))
|
if (!(vg = (*vsn)->read_vg(fid, cft, 1)))
|
||||||
stack;
|
stack;
|
||||||
|
else if ((vg_missing = vg_missing_pv_count(vg))) {
|
||||||
|
log_verbose("There are %d physical volumes missing.",
|
||||||
|
vg_missing);
|
||||||
|
vg_mark_partial_lvs(vg, 1);
|
||||||
|
/* FIXME: move this code inside read_vg() */
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2868,11 +2868,6 @@ static struct volume_group *_vg_read(struct cmd_context *cmd,
|
|||||||
else /* Inconsistent but we can't repair it */
|
else /* Inconsistent but we can't repair it */
|
||||||
correct_vg->status &= ~INCONSISTENT_VG;
|
correct_vg->status &= ~INCONSISTENT_VG;
|
||||||
|
|
||||||
if (vg_missing_pv_count(correct_vg)) {
|
|
||||||
log_verbose("There are %d physical volumes missing.",
|
|
||||||
vg_missing_pv_count(correct_vg));
|
|
||||||
vg_mark_partial_lvs(correct_vg, 1);
|
|
||||||
}
|
|
||||||
return correct_vg;
|
return correct_vg;
|
||||||
} else {
|
} else {
|
||||||
free_vg(correct_vg);
|
free_vg(correct_vg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user