dlm: master - dlm_controld: don't log errors after disabling plocks

David Teigland teigland at fedoraproject.org
Tue Apr 20 22:07:48 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=fae6ee3915d0d1ba3add3082ccd159955b120e45
Commit:        fae6ee3915d0d1ba3add3082ccd159955b120e45
Parent:        fc714e99ee117288c3cc35e20cefb4d55df234ea
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Tue Apr 13 15:40:55 2010 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Tue Apr 20 17:06:20 2010 -0500

dlm_controld: don't log errors after disabling plocks

Once plocks are disabled due to bad checkpoint data, don't spam
the logs with irrelevant plock errors.

bz 582017

Signed-off-by: David Teigland <teigland at redhat.com>
---
 group/dlm_controld/cpg.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/group/dlm_controld/cpg.c b/group/dlm_controld/cpg.c
index af7ac40..2eb3d65 100644
--- a/group/dlm_controld/cpg.c
+++ b/group/dlm_controld/cpg.c
@@ -1595,26 +1595,32 @@ static void deliver_cb(cpg_handle_t handle,
 		break;
 
 	case DLM_MSG_PLOCK:
+		if (ls->disable_plock)
+			break;
 		if (cfgd_enable_plock)
 			receive_plock(ls, hd, len);
-		else if (!ls->disable_plock)
+		else
 			log_error("msg %d nodeid %d enable_plock %d",
 				  hd->type, nodeid, cfgd_enable_plock);
 		break;
 
 	case DLM_MSG_PLOCK_OWN:
+		if (ls->disable_plock)
+			break;
 		if (cfgd_enable_plock && cfgd_plock_ownership)
 			receive_own(ls, hd, len);
-		else if (!ls->disable_plock)
+		else
 			log_error("msg %d nodeid %d enable_plock %d owner %d",
 				  hd->type, nodeid, cfgd_enable_plock,
 				  cfgd_plock_ownership);
 		break;
 
 	case DLM_MSG_PLOCK_DROP:
+		if (ls->disable_plock)
+			break;
 		if (cfgd_enable_plock && cfgd_plock_ownership)
 			receive_drop(ls, hd, len);
-		else if (!ls->disable_plock)
+		else
 			log_error("msg %d nodeid %d enable_plock %d owner %d",
 				  hd->type, nodeid, cfgd_enable_plock,
 				  cfgd_plock_ownership);
@@ -1622,18 +1628,22 @@ static void deliver_cb(cpg_handle_t handle,
 
 	case DLM_MSG_PLOCK_SYNC_LOCK:
 	case DLM_MSG_PLOCK_SYNC_WAITER:
+		if (ls->disable_plock)
+			break;
 		if (cfgd_enable_plock && cfgd_plock_ownership)
 			receive_sync(ls, hd, len);
-		else if (!ls->disable_plock)
+		else
 			log_error("msg %d nodeid %d enable_plock %d owner %d",
 				  hd->type, nodeid, cfgd_enable_plock,
 				  cfgd_plock_ownership);
 		break;
 
 	case DLM_MSG_PLOCKS_STORED:
+		if (ls->disable_plock)
+			break;
 		if (cfgd_enable_plock)
 			receive_plocks_stored(ls, hd, len);
-		else if (!ls->disable_plock)
+		else
 			log_error("msg %d nodeid %d enable_plock %d",
 				  hd->type, nodeid, cfgd_enable_plock);
 		break;


More information about the cluster-commits mailing list