]> sourceware.org Git - lvm2.git/commitdiff
cleanup: rename vg_ondisk to vg_committed
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 24 Nov 2015 22:29:18 +0000 (23:29 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 25 Nov 2015 10:11:21 +0000 (11:11 +0100)
Unifying terminology.

Since all the metadata in-use are ALWAYS on disk - switch
to terminology  committed and precommitted.

Patch has no functional change inside.

lib/metadata/metadata.c
lib/metadata/vg.c
lib/metadata/vg.h

index b1ddb344016dcbd19a0847eeedf0fe4c487cbfe9..52d76c372a15e53b406212f8880fccd516271810 100644 (file)
@@ -936,18 +936,18 @@ static int _vg_update_vg_precommitted(struct volume_group *vg)
        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);
@@ -978,7 +978,7 @@ static struct volume_group *_vg_make_handle(struct cmd_context *cmd,
        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;
@@ -3206,8 +3206,8 @@ int vg_commit(struct volume_group *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);
@@ -5539,10 +5539,10 @@ const struct logical_volume *lv_ondisk(const struct logical_volume *lv)
        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.",
index ca2bf96164c317c970b6548ba20a2128ddcf4fb0..992cf2a9b5aed1a1761d38760c773ca9436432c9 100644 (file)
@@ -98,7 +98,7 @@ void release_vg(struct volume_group *vg)
            !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);
index a21af8b06ccd00f84ceac5973e786883932d05e5..df660a7f22656619506da06f3cfa0d91a3a52f16 100644 (file)
@@ -52,13 +52,13 @@ struct volume_group {
        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 */
 
This page took 0.051871 seconds and 5 git commands to generate.