All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Suppress locking initialisation failure messages when --ignorelockingfailure is used
@ 2010-02-08 13:17 Peter Rajnoha
  2010-02-08 13:32 ` Milan Broz
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Rajnoha @ 2010-02-08 13:17 UTC (permalink / raw)
  To: lvm-devel

We should not show error messages about locking initialisation failures when it is expected
and --ignorelockingfailure option is used (rhbz #561938).

Peter


diff --git a/lib/locking/locking.c b/lib/locking/locking.c
index 54e5e25..db70433 100644
--- a/lib/locking/locking.c
+++ b/lib/locking/locking.c
@@ -237,7 +237,8 @@ int init_locking(int type, struct cmd_context *cmd)
 				 _blocking_supported ? "" : "Non-blocking ");
 
 		if (!init_file_locking(&_locking, cmd)) {
-			log_error("File-based locking initialisation failed.");
+			if (!ignorelockingfailure())
+				log_error("File-based locking initialisation failed.");
 			break;
 		}
 		return 1;
@@ -264,7 +265,8 @@ int init_locking(int type, struct cmd_context *cmd)
 	case 3:
 		log_very_verbose("Cluster locking selected.");
 		if (!init_cluster_locking(&_locking, cmd)) {
-			log_error("Internal cluster locking initialisation failed.");
+			if (!ignorelocking_failure())
+				log_error("Internal cluster locking initialisation failed.");
 			break;
 		}
 		return 1;
@@ -291,7 +293,7 @@ int init_locking(int type, struct cmd_context *cmd)
 			  "be inaccessible.");
 		if (init_file_locking(&_locking, cmd))
 			return 1;
-		else
+		else if (!ignorelockingfailure())
 			log_error("File-based locking initialisation failed.");
 	}
 



^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-02-08 16:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-08 13:17 [PATCH] Suppress locking initialisation failure messages when --ignorelockingfailure is used Peter Rajnoha
2010-02-08 13:32 ` Milan Broz
2010-02-08 13:46   ` Mike Snitzer
2010-02-08 14:36     ` Peter Rajnoha
2010-02-08 14:55       ` Mike Snitzer
2010-02-08 15:01         ` Peter Rajnoha
2010-02-08 15:04         ` Milan Broz
2010-02-08 15:09           ` Mike Snitzer
2010-02-08 15:31             ` Milan Broz
2010-02-08 16:25               ` Mike Snitzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.