cluster: STABLE3 - dlm_controld: set last_plock_time for ownership operations

David Teigland teigland at fedoraproject.org
Wed Mar 31 20:41:52 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=46ae11537137ce73b55b67343e67c6c469fdddd1
Commit:        46ae11537137ce73b55b67343e67c6c469fdddd1
Parent:        e2ccbf90543cf1d163d1a067bf5a8ce049a9c134
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Wed Mar 31 15:05:49 2010 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Wed Mar 31 15:41:28 2010 -0500

dlm_controld: set last_plock_time for ownership operations

last_plock_time was not being set for ops related to ownership mode
like "own" and "drop" which change the plock state that is saved in
checkpoints.  Not changing last_plock_time means we don't detect
that plock state has changed when it has, and may end up reusing an
old checkpoint, causing a mounting node to read incorrect resource
ownership state.

bz 578626

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

diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c
index 1321af4..a534300 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -1073,6 +1073,8 @@ static void _receive_own(struct lockspace *ls, struct dlm_header *hd, int len)
 	int from = hd->nodeid;
 	int rv;
 
+	ls->last_plock_time = time(NULL);
+
 	memcpy(&info, (char *)hd + sizeof(struct dlm_header), sizeof(info));
 	info_bswap_in(&info);
 
@@ -1245,6 +1247,8 @@ static void _receive_sync(struct lockspace *ls, struct dlm_header *hd, int len)
 	int from = hd->nodeid;
 	int rv;
 
+	ls->last_plock_time = time(NULL);
+
 	memcpy(&info, (char *)hd + sizeof(struct dlm_header), sizeof(info));
 	info_bswap_in(&info);
 
@@ -1290,6 +1294,8 @@ static void _receive_drop(struct lockspace *ls, struct dlm_header *hd, int len)
 	int from = hd->nodeid;
 	int rv;
 
+	ls->last_plock_time = time(NULL);
+
 	memcpy(&info, (char *)hd + sizeof(struct dlm_header), sizeof(info));
 	info_bswap_in(&info);
 


More information about the cluster-commits mailing list