[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH 3/14] Properly enforce cluster locking in _vg_lock_and_read.



Wed Jan 21 15:52:36 CET 2009  Petr Rockai <me mornfall net>
  * Properly enforce cluster locking in _vg_lock_and_read.
diff -rN -u -p old-temp.4430/lib/metadata/metadata.c new-temp.4430/lib/metadata/metadata.c
--- old-temp.4430/lib/metadata/metadata.c	2009-01-22 11:02:36.870777955 +0100
+++ new-temp.4430/lib/metadata/metadata.c	2009-01-22 11:02:36.918780355 +0100
@@ -2595,6 +2595,12 @@ static vg_t *_vg_lock_and_read(struct cm
 		goto_bad;
 	}
 
+	if (vg_is_clustered(vg) && !locking_is_clustered()) {
+		log_error("Skipping clustered volume group %s", vg->name);
+		failure |= FAILED_CLUSTERED;
+		goto_bad;
+	}
+
 	/* consistent == 0 when VG is not found, but failed == FAILED_NOTFOUND */
 	if (!consistent && !failure) {
 		if (!(vg = _recover_vg(cmd, lock, vg_name, vgid, lock_flags))) {
@@ -2605,7 +2611,7 @@ static vg_t *_vg_lock_and_read(struct cm
 		}
 	}
 
-	failure |= _vg_check_status(vg, status_flags);
+	failure |= _vg_check_status(vg, status_flags & ~CLUSTERED);
 	if (failure)
 		goto_bad;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]