dlm: master - dlm_controld: set last_plock_time for ownership operations

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


Gitweb:        http://git.fedorahosted.org/git/dlm.git?p=dlm.git;a=commitdiff;h=ad80dd21d1f2f91989ba09e47277c939859dc5ca
Commit:        ad80dd21d1f2f91989ba09e47277c939859dc5ca
Parent:        812bc3508dad949c0ee5c5a73ab5bd5b6023310a
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Wed Mar 31 15:05:49 2010 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Tue Apr 20 17:05:49 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 a318eda..9766ec3 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -1072,6 +1072,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);
 
@@ -1244,6 +1246,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);
 
@@ -1289,6 +1293,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