public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - gfs_controld: fix default plock_ownership in compat mode
@ 2009-07-02 21:23 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2009-07-02 21:23 UTC (permalink / raw)
To: cluster-cvs-relay
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-07-02 21:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-02 21:23 cluster: STABLE3 - gfs_controld: fix default plock_ownership in compat mode David Teigland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).