cluster: STABLE3 - gfs_controld: set last_plock_time for ownership operations

David Teigland teigland at fedoraproject.org
Wed Mar 31 20:53:49 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f6994d1db1688140ae011c733efdbaa0af6808fb
Commit:        f6994d1db1688140ae011c733efdbaa0af6808fb
Parent:        41a8154dbe97608a45bcd80666b7b5f74527a5f9
Author:        David Teigland <teigland at redhat.com>
AuthorDate:    Wed Mar 31 15:51:27 2010 -0500
Committer:     David Teigland <teigland at redhat.com>
CommitterDate: Wed Mar 31 15:53:27 2010 -0500

gfs_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/gfs_controld/plock.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/group/gfs_controld/plock.c b/group/gfs_controld/plock.c
index 39113cf..710e73a 100644
--- a/group/gfs_controld/plock.c
+++ b/group/gfs_controld/plock.c
@@ -1034,6 +1034,8 @@ static void _receive_own(struct mountgroup *mg, char *buf, int len, int from)
 	int should_not_happen = 0;
 	int rv;
 
+	mg->last_plock_time = time(NULL);
+
 	memcpy(&info, buf + sizeof(struct gdlm_header), sizeof(info));
 	info_bswap_in(&info);
 
@@ -1200,6 +1202,8 @@ static void _receive_sync(struct mountgroup *mg, char *buf, int len, int from)
 	struct resource *r;
 	int rv;
 
+	mg->last_plock_time = time(NULL);
+
 	memcpy(&info, buf + sizeof(struct gdlm_header), sizeof(info));
 	info_bswap_in(&info);
 
@@ -1245,6 +1249,8 @@ static void _receive_drop(struct mountgroup *mg, char *buf, int len, int from)
 	struct resource *r;
 	int rv;
 
+	mg->last_plock_time = time(NULL);
+
 	memcpy(&info, buf + sizeof(struct gdlm_header), sizeof(info));
 	info_bswap_in(&info);
 


More information about the cluster-commits mailing list