return 1;
}
-static int _vg_update_vg_ondisk(struct volume_group *vg)
+static int _vg_update_vg_committed(struct volume_group *vg)
{
if (dm_pool_locked(vg->vgmem))
return 1;
- if (vg->vg_ondisk || is_orphan_vg(vg->name)) /* we already have it */
+ if (vg->vg_committed || is_orphan_vg(vg->name)) /* we already have it */
return 1;
if (!_vg_update_vg_precommitted(vg))
return_0;
- vg->vg_ondisk = vg->vg_precommitted;
+ vg->vg_committed = vg->vg_precommitted;
vg->vg_precommitted = NULL;
if (vg->cft_precommitted) {
dm_config_destroy(vg->cft_precommitted);
if (vg->read_status != failure)
vg->read_status = failure;
- if (vg->fid && !_vg_update_vg_ondisk(vg))
+ if (vg->fid && !_vg_update_vg_committed(vg))
vg->read_status |= FAILED_ALLOCATION;
return vg;
vg->old_name = NULL;
/* This *is* the original now that it's commited. */
- release_vg(vg->vg_ondisk);
- vg->vg_ondisk = vg->vg_precommitted;
+ release_vg(vg->vg_committed);
+ vg->vg_committed = vg->vg_precommitted;
vg->vg_precommitted = NULL;
if (vg->cft_precommitted) {
dm_config_destroy(vg->cft_precommitted);
if (!lv)
return NULL;
- if (!lv->vg->vg_ondisk)
+ if (!lv->vg->vg_committed)
return lv;
- vg = lv->vg->vg_ondisk;
+ vg = lv->vg->vg_committed;
if (!(found_lv = find_lv_in_vg_by_lvid(vg, &lv->lvid))) {
log_error(INTERNAL_ERROR "LV %s (UUID %s) not found in ondisk metadata.",
!lvmcache_vginfo_holders_dec_and_test_for_zero(vg->vginfo))
return;
- release_vg(vg->vg_ondisk);
+ release_vg(vg->vg_committed);
release_vg(vg->vg_precommitted);
if (vg->cft_precommitted)
dm_config_destroy(vg->cft_precommitted);
unsigned skip_validate_lock_args : 1;
/*
- * The parsed on-disk copy of this VG; is NULL if this is the on-disk
- * version (i.e. vg_ondisk == NULL *implies* this is the on-disk copy,
- * there is no guarantee that if this VG is the same as the on-disk one
+ * The parsed committed (on-disk) copy of this VG; is NULL if this VG is committed
+ * version (i.e. vg_committed == NULL *implies* this is the committed copy,
+ * there is no guarantee that if this VG is the same as the committed one
* this will be NULL). The pointer is maintained by calls to
- * _vg_update_vg_ondisk.
+ * _vg_update_vg_committed.
*/
- struct volume_group *vg_ondisk;
+ struct volume_group *vg_committed;
struct dm_config_tree *cft_precommitted; /* Precommitted metadata */
struct volume_group *vg_precommitted; /* Parsed from cft */