From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Mon, 14 Apr 2008 12:47:32 -0500 Subject: [Cluster-devel] kernel for building master In-Reply-To: <20080411162952.6062.qmail@sourceware.org> References: <20080411162952.6062.qmail@sourceware.org> Message-ID: <20080414174732.GC9696@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, Apr 11, 2008 at 04:29:52PM -0000, teigland at sourceware.org wrote: > - Log ----------------------------------------------------------------- > commit 77bce77b5034adf8f00090b13dde7c7d481b0dd9 > Author: David Teigland > Date: Wed Mar 19 16:05:20 2008 -0500 > > dlm_controld: new version > > - uses libcpg directly without libgroup (use the -g0 option) > - takes over plock handling from gfs_controld > - interacts with fenced and fs_controld to coordinate recovery (todo) > - runs in backward compat mode by default, using libgroup to interact > with old groupd/dlm_controld (-g1 option) > - plan to add a new default -g2 option that will detect old groupd's in > the cluster and only run in old mode if any exist > > Signed-off-by: David Teigland > > ----------------------------------------------------------------------- This commit assumes dlm kernel changes that are only available in linux-next or linux-mm (linux/dlm_plock.h). This goes against our aim to keep master building against -rc kernels by default, so the following patch disables the relevant part for now. Fabio has said he may turn this ifdef into something more sophisticated. diff --git a/group/dlm_controld/main.c b/group/dlm_controld/main.c index b954f53..25c0796 100644 --- a/group/dlm_controld/main.c +++ b/group/dlm_controld/main.c @@ -546,11 +546,13 @@ static int loop(void) setup_deadlock(); } +#ifdef BUILD_PLOCK rv = setup_plocks(); if (rv < 0) goto out; plock_fd = rv; plock_ci = client_add(rv, process_plocks, NULL); +#endif BUILD_PLOCK } for (;;) { diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c index 4dc38ac..5492cc1 100644 --- a/group/dlm_controld/plock.c +++ b/group/dlm_controld/plock.c @@ -12,6 +12,8 @@ #include "dlm_daemon.h" #include "config.h" + +#ifdef BUILD_PLOCK #include #define PROC_MISC "/proc/misc" @@ -2293,3 +2295,21 @@ int dump_plocks(char *name, int fd) return 0; } +#else + +int setup_plocks(void) { return 0 }; +void process_plocks(int ci) { }; +int limit_plocks(void) { return 0; }; +void receive_plock(struct lockspace *ls, struct dlm_header *hd, int len) { }; +void receive_own(struct lockspace *ls, struct dlm_header *hd, int len) { }; +void receive_sync(struct lockspace *ls, struct dlm_header *hd, int len) { }; +void receive_drop(struct lockspace *ls, struct dlm_header *hd, int len) { }; +void process_saved_plocks(struct lockspace *ls) { }; +void close_plock_checkpoint(struct lockspace *ls) { }; +void store_plocks(struct lockspace *ls) { }; +void retrieve_plocks(struct lockspace *ls) { }; +void purge_plocks(struct lockspace *ls, int nodeid, int unmount) { }; +int dump_plocks(char *name, int fd) { return 0 }; + +#endif +