dlm: master - dlm_controld: fix plock owner in checkpoints

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


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

dlm_controld: fix plock owner in checkpoints

The wrong plock resource owner is written into checkpoints
when plock_ownership is 0.  This causes a node that mounts
the fs to have incorrect owner values, which cause the
plock operations to permanently hang.

This bug seems to have existed since the plock code was originally
copied into dlm_controld from gfs_controld.  As part of the copy,
there were some small code changes.  One was to always include the
resource owner in the checkpoint data, instead of only including it
when plock_ownership was 1.  The owner was then written and read
incorrectly when plock_ownership was 0.

bz 618814

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

diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c
index 92cecdc..15bb2f1 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -1923,7 +1923,9 @@ void store_plocks(struct lockspace *ls, uint32_t *sig)
 	     (there should be no SYNCING plocks) */
 
 	list_for_each_entry(r, &ls->plock_resources, list) {
-		if (r->owner == -1)
+		if (!cfgd_plock_ownership)
+			owner = 0;
+		else if (r->owner == -1)
 			continue;
 		else if (r->owner == our_nodeid)
 			owner = our_nodeid;


More information about the cluster-commits mailing list