This is the mail archive of the
cluster-cvs@sourceware.org
mailing list for the cluster.
cluster: STABLE3 - gfs_controld: fix default plock_ownership incompat mode
- From: David Teigland <teigland at fedoraproject dot org>
- To: cluster-cvs-relay at redhat dot com
- Date: Thu, 2 Jul 2009 21:23:26 +0000 (UTC)
- Subject: cluster: STABLE3 - gfs_controld: fix default plock_ownership incompat mode
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=457eaf5565e2804d3c6e367e7256c23752debcef
Commit: 457eaf5565e2804d3c6e367e7256c23752debcef
Parent: b836d0ea80be55cc9cad84a4f44a725b4a34536f
Author: David Teigland <teigland@redhat.com>
AuthorDate: Thu Jul 2 16:13:17 2009 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Thu Jul 2 16:16:48 2009 -0500
gfs_controld: fix default plock_ownership in compat mode
The cluster2 default is plock_owernship=0, so if running in compat mode
that should be the default. All nodes must use the same plock_ownership
value or the protocol doesn't match (regardless of cluster2 vs cluster3)
Signed-off-by: David Teigland <teigland@redhat.com>
---
group/gfs_controld/config.c | 10 +++++++++-
group/gfs_controld/gfs_daemon.h | 1 +
group/gfs_controld/main.c | 6 ++++++
3 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/group/gfs_controld/config.c b/group/gfs_controld/config.c
index 0be26e5..b97e2de 100644
--- a/group/gfs_controld/config.c
+++ b/group/gfs_controld/config.c
@@ -170,6 +170,12 @@ int setup_ccs(void)
}
ccs_handle = cd;
+ /* plock_ownership is a special case */
+ if (optd_plock_ownership)
+ using_default_plock_ownership = 0;
+ else
+ using_default_plock_ownership = 1;
+
/* These config values are set from cluster.conf only if they haven't
already been set on the command line. */
@@ -182,7 +188,9 @@ int setup_ccs(void)
if (!optd_plock_ownership) {
rv = read_ccs_int(PLOCK_OWNERSHIP_PATH, &cfgd_plock_ownership);
if (rv < 0)
- read_ccs_int(DLM_PLOCK_OWNERSHIP_PATH, &cfgd_plock_ownership);
+ rv = read_ccs_int(DLM_PLOCK_OWNERSHIP_PATH, &cfgd_plock_ownership);
+ if (!rv)
+ using_default_plock_ownership = 0;
}
/* The following can be changed while running */
diff --git a/group/gfs_controld/gfs_daemon.h b/group/gfs_controld/gfs_daemon.h
index a76c7f4..11c71c7 100644
--- a/group/gfs_controld/gfs_daemon.h
+++ b/group/gfs_controld/gfs_daemon.h
@@ -86,6 +86,7 @@ extern int group_mode;
extern uint32_t plock_minor;
extern uint32_t old_plock_minor;
extern struct list_head withdrawn_mounts;
+extern int using_default_plock_ownership;
void daemon_dump_save(void);
diff --git a/group/gfs_controld/main.c b/group/gfs_controld/main.c
index 0235b26..ae59d80 100644
--- a/group/gfs_controld/main.c
+++ b/group/gfs_controld/main.c
@@ -1200,6 +1200,11 @@ static void loop(void)
} else if (group_mode == GROUP_LIBGROUP) {
+ /* the stable2 default is zero plock_ownership which we need
+ to match or protocol_active will differ */
+ if (using_default_plock_ownership)
+ cfgd_plock_ownership = 0;
+
/*
* The old, bad, way of doing things using libgroup.
* code in: cpg-old.c group.c plock.c
@@ -1576,4 +1581,5 @@ int group_mode;
uint32_t plock_minor;
uint32_t old_plock_minor;
struct list_head withdrawn_mounts;
+int using_default_plock_ownership;