]> sourceware.org Git - lvm2.git/commitdiff
Remove more clvm code
authorDavid Teigland <teigland@redhat.com>
Tue, 5 Jun 2018 16:39:07 +0000 (11:39 -0500)
committerDavid Teigland <teigland@redhat.com>
Wed, 6 Jun 2018 18:58:34 +0000 (13:58 -0500)
lib/format_text/archiver.c
lib/locking/locking.h
lib/metadata/metadata.c

index 9d7be95eeb8464121fa31bf06c794860c6402961..ab801178d67003cea433bb45508905af39295a2c 100644 (file)
@@ -275,10 +275,6 @@ int backup(struct volume_group *vg)
        if (is_orphan_vg(vg->name))
                return 1;
 
-       if (vg_is_clustered(vg))
-               if (!remote_backup_metadata(vg))
-                       stack;
-
        return backup_locally(vg);
 }
 
index 8322bae316086b6ccb8017de74e055ed810629dd..8b2bced3ed80a33d122071b256725544a6d10237 100644 (file)
@@ -163,10 +163,7 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
 
 #define LCK_MASK (LCK_TYPE_MASK | LCK_SCOPE_MASK)
 
-#define LCK_LV_CLUSTERED(lv)   \
-       (vg_is_clustered((lv)->vg) ? LCK_CLUSTER_VG : 0)
-
-#define lock_lv_vol(cmd, lv, flags) lock_vol(cmd, (lv)->lvid.s, flags | LCK_LV_CLUSTERED(lv), lv) 
+#define lock_lv_vol(cmd, lv, flags) lock_vol(cmd, (lv)->lvid.s, flags, lv) 
 
 /*
  * Activation locks are wrapped around activation commands that have to
@@ -180,7 +177,9 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
  */
 
 #define lv_type_requires_activation_lock(lv) ((lv_is_thin_type(lv) || lv_is_cache_type(lv) || lv_is_mirror_type(lv) || lv_is_raid_type(lv) || lv_is_origin(lv) || lv_is_snapshot(lv)) ? 1 : 0)
+
 #define lv_activation_lock_name(lv) (lv_type_requires_activation_lock(lv) ? (lv)->vg->name : (lv)->lvid.s)
+
 #define lv_requires_activation_lock_now(lv) ((!vg_write_lock_held() && (!vg_is_clustered((lv)->vg) || !lv_type_requires_activation_lock(lv))) ? 1 : 0)
 
 #define lock_activation(cmd, lv)       (lv_requires_activation_lock_now(lv) ? lock_vol(cmd, lv_activation_lock_name(lv), LCK_ACTIVATE_LOCK, lv) : 1)
@@ -246,16 +245,12 @@ int activate_lv_excl(struct cmd_context *cmd, const struct logical_volume *lv);
 
 #define activate_lv_local(cmd, lv)     \
        lock_lv_vol_serially(cmd, lv, LCK_LV_ACTIVATE | LCK_HOLD | LCK_LOCAL)
+
 #define deactivate_lv_local(cmd, lv)   \
        lock_lv_vol_serially(cmd, lv, LCK_LV_DEACTIVATE | LCK_LOCAL)
+
 #define drop_cached_metadata(vg)       \
        lock_vol((vg)->cmd, (vg)->name, LCK_VG_DROP_CACHE, NULL)
-#define remote_commit_cached_metadata(vg)      \
-       lock_vol((vg)->cmd, (vg)->name, LCK_VG_COMMIT, NULL)
-#define remote_revert_cached_metadata(vg)      \
-       lock_vol((vg)->cmd, (vg)->name, LCK_VG_REVERT, NULL)
-#define remote_backup_metadata(vg)     \
-       lock_vol((vg)->cmd, (vg)->name, LCK_VG_BACKUP, NULL)
 
 int sync_local_dev_names(struct cmd_context* cmd);
 int sync_dev_names(struct cmd_context* cmd);
index 3f177b061950002f9ab65b9a9a60d7618c949226..7c41d7891a01b0db5e8e82d98f0bbabb37a59d87 100644 (file)
@@ -3130,10 +3130,6 @@ int vg_commit(struct volume_group *vg)
        set_vg_notify(vg->cmd);
 
        if (cache_updated) {
-               /* Instruct remote nodes to upgrade cached metadata. */
-               if (!remote_commit_cached_metadata(vg))
-                       stack; // FIXME: What should we do?
-
                /*
                 * We need to clear old_name after a successful commit.
                 * The volume_group structure could be reused later.
@@ -3188,9 +3184,6 @@ void vg_revert(struct volume_group *vg)
        if (!drop_cached_metadata(vg))
                log_error("Attempt to drop cached metadata failed "
                          "after reverted update for VG %s.", vg->name);
-
-       if (!remote_revert_cached_metadata(vg))
-               stack; // FIXME: What should we do?
 }
 
 static int _check_mda_in_use(struct metadata_area *mda, void *_in_use)
This page took 0.043178 seconds and 5 git commands to generate.