]> sourceware.org Git - lvm2.git/commitdiff
Replicator: lock_lv_vol() finds missing VGs
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 21 May 2010 14:29:49 +0000 (14:29 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 21 May 2010 14:29:49 +0000 (14:29 +0000)
Find and check for all needed VGs before calling lock_vol().

WHATS_NEW
lib/locking/locking.h

index e9d28ec53b73f06a62cc1eb1f31e97dc113b4317..787ac8821ef114eb8d9530850dd85f0cfe3e8451 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.67 -
 ===============================
+  Check for missing VGs before taking lock_lv_vol (for Replicator).
   Update process_each_lv_in_vg() to use cmd_vg structure.
   Update _process_one_vg() to work with cmd_vg structure.
   Add functions for read and release VGs list.
index 6d86d3c1a05ecbe5a5354a5c296430bea949e448..d904cf228c9cfb812dcf3d0c0d375c26674a3c5f 100644 (file)
@@ -130,7 +130,9 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname);
        (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))
+       (find_replicator_vgs((lv)) ? \
+               lock_vol(cmd, (lv)->lvid.s, flags | LCK_LV_CLUSTERED(lv)) : \
+               0)
 
 #define unlock_vg(cmd, vol)    lock_vol(cmd, vol, LCK_VG_UNLOCK)
 #define unlock_and_release_vg(cmd, vg, vol) \
This page took 0.045713 seconds and 5 git commands to generate.