]> sourceware.org Git - lvm2.git/commitdiff
Allow CLVMD_CMD_SYNC_NAMES to be propagated around the cluster if requested.
authorAlasdair Kergon <agk@redhat.com>
Wed, 2 Feb 2011 23:39:39 +0000 (23:39 +0000)
committerAlasdair Kergon <agk@redhat.com>
Wed, 2 Feb 2011 23:39:39 +0000 (23:39 +0000)
WHATS_NEW
lib/locking/cluster_locking.c

index 106f2d4a0b8552796b66113be1a3cc1367bd7bc8..18c90febb967557ef51ed860e87965c1e18b1823 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.83 - 
 ===================================
+  Allow CLVMD_CMD_SYNC_NAMES to be propagated around the cluster if requested.
   Add "dmsetup ls --tree" output to lvmdump.
   Fix udev synchronization with no-locking --sysinit (2.02.80).
   Updating man pages for pvcreate, pvremove, pvresize, pvscan.
index 83b1cd20de924356d4e5e2a20471d5e163ec1e31..c9f8fbe35fbf77308f7b8742ac5ffb8532884ecc 100644 (file)
@@ -347,13 +347,17 @@ static int _lock_for_cluster(struct cmd_context *cmd, unsigned char clvmd_cmd,
         * One exception, is that P_ locks (except VG_SYNC_NAMES) /do/ get 
         * distributed across the cluster because they might have side-effects.
         */
-       if ((strncmp(name, "P_", 2) &&
-            (clvmd_cmd == CLVMD_CMD_LOCK_VG ||
-             (flags & LCK_TYPE_MASK) == LCK_EXCL ||
-             (flags & LCK_LOCAL) ||
-             !(flags & LCK_CLUSTER_VG))) ||
-           (clvmd_cmd == CLVMD_CMD_SYNC_NAMES && (flags & LCK_LOCAL)))
-               node = ".";
+       if (clvmd_cmd == CLVMD_CMD_SYNC_NAMES) {
+               if (flags & LCK_LOCAL)
+                       node = ".";
+       } else if (clvmd_cmd != CLVMD_CMD_VG_BACKUP) {
+               if (strncmp(name, "P_", 2) &&
+                   (clvmd_cmd == CLVMD_CMD_LOCK_VG ||
+                    (flags & LCK_TYPE_MASK) == LCK_EXCL ||
+                    (flags & LCK_LOCAL) ||
+                    !(flags & LCK_CLUSTER_VG)))
+                       node = ".";
+       }
 
        status = _cluster_request(clvmd_cmd, node, args, len,
                                  &response, &num_responses);
This page took 0.042292 seconds and 5 git commands to generate.