All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Suppress locking initialisation failure messages when --ignorelockingfailure is used
Date: Mon, 08 Feb 2010 14:17:16 +0100	[thread overview]
Message-ID: <4B700EDC.7020505@redhat.com> (raw)

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.");
 	}
 



             reply	other threads:[~2010-02-08 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-08 13:17 Peter Rajnoha [this message]
2010-02-08 13:32 ` [PATCH] Suppress locking initialisation failure messages when --ignorelockingfailure is used 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B700EDC.7020505@redhat.com \
    --to=prajnoha@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.