dlm: master - dlm_controld: fix plock checkpoint signatures

David Teigland teigland at fedoraproject.org
Fri Aug 13 17:01:51 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=9d70d7d6df3c2d66c6b78cfd5e54353ecbc54b3c
Commit:        9d70d7d6df3c2d66c6b78cfd5e54353ecbc54b3c
Parent:        10e53d7fae4cd576518864fb4309e88402cecc56
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Tue Jul 27 13:50:14 2010 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Fri Aug 13 11:59:36 2010 -0500

dlm_controld: fix plock checkpoint signatures

Commit e2ccbf90543cf1d163d1a067bf5a8ce049a9c134 for bz 578625
was not correct to use "p_count" (a count of plocks) in the
signature calculation.  When plock_ownership is on, the plocks
under an owned resource are not copied into the checkpoint.
However, the node writing the checkpoint counts all these
owned plocks and factors the count into the signature.  The
node reading the checkpoint does not get the plocks, so its
count of plocks is different, causing the signature calculation
to be different.  It will then disable plock operations.
It would be very common for this to occur in practice, so the
impact is very high.

bz 618806

Signed-off-by: David Teigland <teigland at redhat.com>
---
 group/dlm_controld/plock.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c
index 8b3eae2..92cecdc 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -1984,8 +1984,7 @@ void store_plocks(struct lockspace *ls, uint32_t *sig)
 		}
 	}
  out:
-	*sig = (0xFFFFFFFF & r_num_first) ^ (0xFFFFFFFF & r_num_last) ^
-	       r_count ^ p_count;
+	*sig = (0xFFFFFFFF & r_num_first) ^ (0xFFFFFFFF & r_num_last) ^ r_count;
 
 	log_group(ls, "store_plocks first %llu last %llu r_count %u "
 		  "p_count %u sig %x",
@@ -2133,8 +2132,7 @@ void retrieve_plocks(struct lockspace *ls, uint32_t *sig)
  out:
 	saCkptCheckpointClose(h);
 
-	*sig = (0xFFFFFFFF & r_num_first) ^ (0xFFFFFFFF & r_num_last)
-	       ^ r_count ^ p_count;
+	*sig = (0xFFFFFFFF & r_num_first) ^ (0xFFFFFFFF & r_num_last) ^ r_count;
 
 	log_group(ls, "retrieve_plocks first %llu last %llu r_count %u "
 		  "p_count %u sig %x",


More information about the cluster-commits mailing list