]> sourceware.org Git - lvm2.git/commitdiff
Removing locking layer from sync_local_dev_names
authorDavid Teigland <teigland@redhat.com>
Fri, 8 Jun 2018 17:15:22 +0000 (12:15 -0500)
committerDavid Teigland <teigland@redhat.com>
Fri, 8 Jun 2018 17:18:57 +0000 (12:18 -0500)
the indirection is not needed without clvm

lib/locking/file_locking.c
lib/locking/locking.c
lib/locking/locking.h

index 0bded0e63280fdae7225b92cf9d581736ace5c42..6b295e959211ced8853bff467305e8c8c99691f5 100644 (file)
@@ -47,9 +47,6 @@ static int _file_lock_resource(struct cmd_context *cmd, const char *resource,
 
        switch (flags & LCK_SCOPE_MASK) {
        case LCK_VG:
-               if (!strcmp(resource, VG_SYNC_NAMES))
-                       fs_unlock();
-
                /* LCK_CACHE does not require a real lock */
                if (flags & LCK_CACHE)
                        break;
index 7e499bb2316dc3b6c58a348f8da3347495a5e98c..b6bd8d852849c6c4a023f1e9288da6c73950d93c 100644 (file)
@@ -312,14 +312,7 @@ int locking_is_clustered(void)
 int sync_local_dev_names(struct cmd_context* cmd)
 {
        memlock_unlock(cmd);
-
-       return lock_vol(cmd, VG_SYNC_NAMES, LCK_VG_SYNC_LOCAL, NULL);
-}
-
-int sync_dev_names(struct cmd_context* cmd)
-{
-       memlock_unlock(cmd);
-
-       return lock_vol(cmd, VG_SYNC_NAMES, LCK_VG_SYNC, NULL);
+       fs_unlock();
+       return 1;
 }
 
index 96f7d86f06fd425809f19ee16e2d5ffe69bb6b51..f6a385953c437ae5300607541ea303307a24e10a 100644 (file)
@@ -129,7 +129,6 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
  */
 #define VG_ORPHANS     "#orphans"
 #define VG_GLOBAL      "#global"
-#define VG_SYNC_NAMES  "#sync_names"
 
 /*
  * Common combinations
@@ -147,16 +146,13 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
 
 #define LCK_VG_BACKUP          (LCK_VG | LCK_CACHE)
 
-#define LCK_VG_SYNC            (LCK_NONE | LCK_CACHE)
-#define LCK_VG_SYNC_LOCAL      (LCK_NONE | LCK_CACHE | LCK_LOCAL)
-
 #define LCK_MASK (LCK_TYPE_MASK | LCK_SCOPE_MASK)
 
 #define unlock_vg(cmd, vg, vol)        \
        do { \
                if (vg && !lvmetad_vg_update_finish(vg)) \
                        stack; \
-               if (is_real_vg(vol) && !sync_dev_names(cmd)) \
+               if (is_real_vg(vol) && !sync_local_dev_names(cmd)) \
                        stack; \
                if (!lock_vol(cmd, vol, LCK_VG_UNLOCK, NULL)) \
                        stack;  \
@@ -171,7 +167,6 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
        lock_vol((vg)->cmd, (vg)->name, LCK_VG_DROP_CACHE, NULL)
 
 int sync_local_dev_names(struct cmd_context* cmd);
-int sync_dev_names(struct cmd_context* cmd);
 
 /* Process list of LVs */
 struct volume_group;
This page took 0.036005 seconds and 5 git commands to generate.