[Cluster-devel] Cluster Project branch, master, updated. cluster-2.99.04-51-g9e51310

fabbione at sourceware.org fabbione at sourceware.org
Fri Jun 20 14:28:22 UTC 2008


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=9e513104970a78be352cfeea7d557378618b283b

The branch, master has been updated
       via  9e513104970a78be352cfeea7d557378618b283b (commit)
       via  b7dd415ecba984f8ad20205c5291bef203381906 (commit)
       via  48c81719df1cf67e1905b8c74deea944633c40a5 (commit)
       via  44b80c950cd4d942b69f38faeeca44feffce944f (commit)
       via  08e1518655285271a922e1ef5b4d6c0665f97551 (commit)
       via  0cd62a286d8057196b05783d2fb84da2816c187b (commit)
       via  e152f256d1caddeab7dd0a82ab22d577d51545f0 (commit)
      from  d1c086c706bce8fee73491bfda52cffae4e1fc51 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9e513104970a78be352cfeea7d557378618b283b
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Fri Jun 20 16:19:54 2008 +0200

    [QDISK] Major clean up
    
    Kill lots of dead and unused code around.
    
    Switch whatever possible into static functions.
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

commit b7dd415ecba984f8ad20205c5291bef203381906
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Fri Jun 20 15:45:44 2008 +0200

    [QDISK] Init logsys later in the process
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

commit 48c81719df1cf67e1905b8c74deea944633c40a5
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Fri Jun 20 15:41:34 2008 +0200

    [QDISK] Clean handling of debug envvar
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

commit 44b80c950cd4d942b69f38faeeca44feffce944f
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Fri Jun 20 15:39:29 2008 +0200

    [QDISK] Remove duplicate debugging configuration
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

commit 08e1518655285271a922e1ef5b4d6c0665f97551
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Fri Jun 20 15:36:10 2008 +0200

    [QDISK] get_config_data cleanup
    
    get_config_data does not need cluster name.
    
    change invokation from ccs_force_connect to ccs_connect.
    ccs_force_connect returns only when connection is succesful
    and can sit there forever.
    With the new libccs, if we are connected to cman, we can be
    100% sure that we will be able to do a ccs_connect.
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

commit 0cd62a286d8057196b05783d2fb84da2816c187b
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Fri Jun 20 15:34:03 2008 +0200

    [QDISK] Make get_config_data static
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

commit e152f256d1caddeab7dd0a82ab22d577d51545f0
Author: Fabio M. Di Nitto <fdinitto at redhat.com>
Date:   Fri Jun 20 15:33:08 2008 +0200

    [QDISK] Fix debug type
    
    Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>

-----------------------------------------------------------------------

Summary of changes:
 cman/qdisk/Makefile      |    1 -
 cman/qdisk/crc32.c       |    8 ----
 cman/qdisk/daemon_init.c |    3 +-
 cman/qdisk/disk.h        |    1 -
 cman/qdisk/disk_util.c   |   69 +-------------------------------
 cman/qdisk/gettid.c      |   24 -----------
 cman/qdisk/gettid.h      |    7 ---
 cman/qdisk/main.c        |   97 +++++++++++++++-------------------------------
 cman/qdisk/proc.c        |    8 ++--
 cman/qdisk/score.c       |   56 +-------------------------
 cman/qdisk/score.h       |    5 --
 11 files changed, 42 insertions(+), 237 deletions(-)
 delete mode 100644 cman/qdisk/gettid.c
 delete mode 100644 cman/qdisk/gettid.h

diff --git a/cman/qdisk/Makefile b/cman/qdisk/Makefile
index 3384dbc..87888d3 100644
--- a/cman/qdisk/Makefile
+++ b/cman/qdisk/Makefile
@@ -24,7 +24,6 @@ EXTRA_LDFLAGS += -L${cmanlibdir} -L${ccslibdir} -lcman -lccs
 OBJS1=	main.o \
 	score.o \
 	bitmap.o \
-	gettid.o \
 	daemon_init.o
 
 OBJS2=	mkqdisk.o
diff --git a/cman/qdisk/crc32.c b/cman/qdisk/crc32.c
index 796fac9..597d0b7 100644
--- a/cman/qdisk/crc32.c
+++ b/cman/qdisk/crc32.c
@@ -95,11 +95,3 @@ uint32_t clu_crc32(const char *data, size_t count)
 	       return 0;
        	return ~crc;
 }
-
-#if 0
-int
-main(int argc, const char **argv)
-{
-	printf("%08x\n",crc32(argv[1],strlen(argv[1])));
-}
-#endif
diff --git a/cman/qdisk/daemon_init.c b/cman/qdisk/daemon_init.c
index 13803aa..2534f1c 100644
--- a/cman/qdisk/daemon_init.c
+++ b/cman/qdisk/daemon_init.c
@@ -29,7 +29,6 @@
  * This should ultimately go in a header file.
  */
 void daemon_init(char *prog);
-int check_pid_valid(pid_t pid, char *prog);
 int check_process_running(char *prog, pid_t * pid);
 
 /*
@@ -40,7 +39,7 @@ static int setup_sigmask(void);
 
 LOGSYS_DECLARE_SUBSYS ("QDISK", LOG_LEVEL_INFO);
 
-int
+static int
 check_pid_valid(pid_t pid, char *prog)
 {
 	FILE *fp;
diff --git a/cman/qdisk/disk.h b/cman/qdisk/disk.h
index d56ffc7..0062c86 100644
--- a/cman/qdisk/disk.h
+++ b/cman/qdisk/disk.h
@@ -268,7 +268,6 @@ typedef struct {
 
 int qd_write_status(qd_ctx *ctx, int nid, disk_node_state_t state,
 		    disk_msg_t *msg, memb_mask_t mask, memb_mask_t master);
-int qd_read_print_status(target_info_t *disk, int nid);
 int qd_init(qd_ctx *ctx, cman_handle_t ch, int me);
 void qd_destroy(qd_ctx *ctx);
 
diff --git a/cman/qdisk/disk_util.c b/cman/qdisk/disk_util.c
index 45a2b10..47614d3 100644
--- a/cman/qdisk/disk_util.c
+++ b/cman/qdisk/disk_util.c
@@ -86,7 +86,7 @@ get_time(struct timeval *tv, int use_uptime)
 /**
   Update write times and calculate a new average time
  */
-void
+static void
 qd_update_wtime(qd_ctx *ctx, struct timeval *newtime)
 {
 	int x;
@@ -205,75 +205,10 @@ qd_write_status(qd_ctx *ctx, int nid, disk_node_state_t state,
 }
 
 
-int
-qd_print_status(target_info_t *disk, status_block_t *ps)
-{
-	int x;
-
-	printf("Data @ offset %d:\n",
-	       (int)qdisk_nodeid_offset(ps->ps_nodeid, disk->d_blksz));
-	printf("status_block_t {\n");
-	printf("\t.ps_magic = %08x;\n", (int)ps->ps_magic);
-	printf("\t.ps_nodeid = %d;\n", (int)ps->ps_nodeid);
-	printf("\t.ps_updatenode = %d;\n", (int)ps->ps_updatenode);
-	printf("\t.pad0 = %d;\n", (int)ps->pad0);
-	printf("\t.ps_timestamp = %llu;\n", (long long unsigned)
-		ps->ps_timestamp);
-	printf("\t.ps_state = %d;\n", ps->ps_state);
-	printf("\t.pad1[0] = %d;\n", ps->pad1[0]);
-	printf("\t.ps_flags = %d;\n", ps->ps_flags);
-	printf("\t.ps_score = %d;\n", ps->ps_score);
-	printf("\t.ps_scoremax = %d;\n", ps->ps_scoremax);
-	printf("\t.ps_ca_sec = %d;\n", ps->ps_ca_sec);
-	printf("\t.ps_ca_usec = %d;\n", ps->ps_ca_usec);
-	printf("\t.ps_lc_sec = %d;\n", ps->ps_lc_sec);
-	printf("\t.ps_lc_usec = %d;\n", ps->ps_lc_usec);
-	printf("\t.ps_mask = 0x");
-	for (x = (sizeof(memb_mask_t)-1); x >= 0; x--)
-		printf("%02x", ps->ps_mask[x]);
-	printf("\n");
-	printf("\t.ps_master_mask = 0x");
-	for (x = (sizeof(memb_mask_t)-1); x >= 0; x--)
-		printf("%02x", ps->ps_mask[x]);
-	printf("\n");
-
-	printf("}\n");
-
-	return 0;
-}
-
-
-int
-qd_read_print_status(target_info_t *disk, int nid)
-{
-	status_block_t ps;
-
-	if (!disk || disk->d_fd < 0) {
-		errno = EINVAL;
-		return -1;
-	}
-
-	if (nid <= 0) {
-		errno = EINVAL;
-		return -1;
-	}
-
-	if (qdisk_read(disk, qdisk_nodeid_offset(nid, disk->d_blksz), &ps,
-			sizeof(ps)) < 0) {
-		log_printf(LOG_ERR, "Error reading node ID block %d\n", nid);
-		return -1;
-	}
-	swab_status_block_t(&ps);
-	qd_print_status(disk, &ps);
-
-	return 0;
-}
-
-
 /**
   Generate a token based on the current system time.
  */
-uint64_t
+static uint64_t
 generate_token(void)
 {
 	uint64_t my_token = 0;
diff --git a/cman/qdisk/gettid.c b/cman/qdisk/gettid.c
deleted file mode 100644
index 620a785..0000000
--- a/cman/qdisk/gettid.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <linux/unistd.h>
-#include <gettid.h>
-#include <unistd.h>
-#include <errno.h>
-
-/* Patch from Adam Conrad / Ubuntu: Don't use _syscall macro */
-
-#ifdef __NR_gettid
-pid_t gettid (void)
-{
-	return syscall(__NR_gettid);
-}
-#else
-
-#warn "gettid not available -- substituting with pthread_self()"
-
-#include <pthread.h>
-pid_t gettid (void)
-{
-	return (pid_t)pthread_self();
-}
-#endif
diff --git a/cman/qdisk/gettid.h b/cman/qdisk/gettid.h
deleted file mode 100644
index 636560c..0000000
--- a/cman/qdisk/gettid.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __GETTID_H
-#define __GETTID_H
-
-pid_t gettid(void);
-
-#endif
-
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 31e7819..1f1d082 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -28,9 +28,13 @@
 #include <cluster/cnxman-socket.h>
 #endif
 
+/* from daemon_init.c */
 int daemon_init(char *);
 int check_process_running(char *, pid_t *);
 
+/* from proc.c */
+char *state_str(disk_node_state_t s);
+
 /*
   TODO:
   1) Take into account timings to gracefully extend node timeouts during 
@@ -48,7 +52,7 @@ inline void _diff_tv(struct timeval *dest, struct timeval *start,
 		     struct timeval *end);
 
 static int _running = 1;
-void update_local_status(qd_ctx *ctx, node_info_t *ni, int max, int score,
+static void update_local_status(qd_ctx *ctx, node_info_t *ni, int max, int score,
 		    	 int score_req, int score_max);
 
 
@@ -69,7 +73,7 @@ int_handler(int sig)
 /**
   Simple thing to see if a node is running.
  */
-inline int
+static inline int
 state_run(disk_node_state_t state)
 {
 	return (state >= S_INIT ? state : 0);
@@ -79,7 +83,7 @@ state_run(disk_node_state_t state)
 /**
   Clear out / initialize node info block.
  */
-void
+static void
 node_info_init(node_info_t *ni, int max)
 {
 	int x;
@@ -100,7 +104,7 @@ node_info_init(node_info_t *ni, int max)
   Rare case; usually other nodes would put up the 'Undead' message and
   re-evict us.
  */
-void
+static void
 check_self(qd_ctx *ctx, status_block_t *sb)
 {
 	if (!sb->ps_updatenode ||
@@ -125,7 +129,7 @@ check_self(qd_ctx *ctx, status_block_t *sb)
   or has not updated their timestamp recently.  See check_transitions as
   well.
  */
-void
+static void
 read_node_blocks(qd_ctx *ctx, node_info_t *ni, int max)
 {
 	int x;
@@ -181,7 +185,7 @@ read_node_blocks(qd_ctx *ctx, node_info_t *ni, int max)
 /**
   Check for node transitions.
  */
-void
+static void
 check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
 {
 	int x;
@@ -369,7 +373,7 @@ check_transitions(qd_ctx *ctx, node_info_t *ni, int max, memb_mask_t mask)
   Checks for presence of an online master.  If there is no
   Returns
  */
-int
+static int
 master_exists(qd_ctx *ctx, node_info_t *ni, int max, int *low_id, int *count)
 {
 	int x;
@@ -437,7 +441,7 @@ master_exists(qd_ctx *ctx, node_info_t *ni, int max, int *low_id, int *count)
   a cluster running using this QD.  Note that this will delay master
   election if multiple nodes start with a second or two of each other.
  */
-int
+static int
 quorum_init(qd_ctx *ctx, node_info_t *ni, int max, struct h_data *h, int maxh)
 {
 	int x = 0, score, maxscore, score_req;
@@ -505,7 +509,7 @@ quorum_init(qd_ctx *ctx, node_info_t *ni, int max, struct h_data *h, int maxh)
 /**
   Vote for a master if it puts a bid in.
  */
-void
+static void
 do_vote(qd_ctx *ctx, node_info_t *ni, int max, disk_msg_t *msg)
 {
 	int x;
@@ -533,7 +537,7 @@ do_vote(qd_ctx *ctx, node_info_t *ni, int max, disk_msg_t *msg)
   Check to match nodes in mask with nodes online according to CMAN.
   Only the master needs to do this.
  */
-void
+static void
 check_cman(qd_ctx *ctx, memb_mask_t mask, memb_mask_t master_mask)
 {
 	cman_node_t nodes[MAX_NODES_DISK];
@@ -569,7 +573,7 @@ check_cman(qd_ctx *ctx, memb_mask_t mask, memb_mask_t master_mask)
 	*msg - it will store the vote for the lowest bid if we should
 	clear our bid.
  */ 
-int
+static int
 check_votes(qd_ctx *ctx, node_info_t *ni, int max, disk_msg_t *msg)
 {
 	int x, running = 0, acks = 0, nacks = 0, low_id = ctx->qc_my_id;
@@ -611,12 +615,7 @@ check_votes(qd_ctx *ctx, node_info_t *ni, int max, disk_msg_t *msg)
 	return 0;
 }
 
-
-char *
-state_str(disk_node_state_t s);
-
-
-void
+static void
 print_node_info(FILE *fp, node_info_t *ni)
 {
 	fprintf(fp, "node_info_t [node %d] {\n", ni->ni_status.ps_nodeid);
@@ -645,7 +644,7 @@ print_node_info(FILE *fp, node_info_t *ni)
 }
 
 
-void
+static void
 update_local_status(qd_ctx *ctx, node_info_t *ni, int max, int score,
 		    int score_req, int score_max)
 {
@@ -725,36 +724,6 @@ out:
 		fclose(fp);
 }
 
-
-/* Timeval functions from clumanager */
-/**
- * Scale a (struct timeval).
- *
- * @param tv		The timeval to scale.
- * @param scale		Positive multiplier.
- * @return		tv
- */
-struct timeval *
-_scale_tv(struct timeval *tv, int scale)
-{
-	tv->tv_sec *= scale;
-	tv->tv_usec *= scale;
-
-	if (tv->tv_usec > 1000000) {
-		tv->tv_sec += (tv->tv_usec / 1000000);
-		tv->tv_usec = (tv->tv_usec % 1000000);
-	}
-
-	return tv;
-}
-
-
-
-#define _print_tv(val) \
-	printf("%s: %d.%06d\n", #val, (int)((val)->tv_sec), \
-			(int)((val)->tv_usec))
-
-
 static inline int
 _cmp_tv(struct timeval *left, struct timeval *right)
 {
@@ -800,7 +769,7 @@ set_priority(int queue, int prio)
 }
 
 
-int
+static int
 cman_alive(cman_handle_t ch)
 {
 	fd_set rfds;
@@ -820,7 +789,7 @@ cman_alive(cman_handle_t ch)
 }
 
 
-int
+static int
 quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
 {
 	disk_msg_t msg = {0, 0, 0};
@@ -1074,7 +1043,7 @@ quorum_loop(qd_ctx *ctx, node_info_t *ni, int max)
 /**
   Tell the other nodes we're done (safely!).
  */
-int
+static int
 quorum_logout(qd_ctx *ctx)
 {
 	/* Write out our status */
@@ -1090,8 +1059,8 @@ quorum_logout(qd_ctx *ctx)
 /**
   Grab all our configuration data from CCSD
  */
-int
-get_config_data(char *cluster_name, qd_ctx *ctx, struct h_data *h, int maxh,
+static int
+get_config_data(qd_ctx *ctx, struct h_data *h, int maxh,
 		int *cfh, int debug)
 {
 	int ccsfd = -1, loglevel = 4;
@@ -1100,7 +1069,7 @@ get_config_data(char *cluster_name, qd_ctx *ctx, struct h_data *h, int maxh,
 
 	log_printf(LOG_DEBUG, "Loading configuration information\n");
 
-	ccsfd = ccs_force_connect(cluster_name, 1);
+	ccsfd = ccs_connect();
 	if (ccsfd < 0) {
 		log_printf(LOG_CRIT, "Connection to CCSD failed; cannot start\n");
 		return -1;
@@ -1355,7 +1324,7 @@ get_config_data(char *cluster_name, qd_ctx *ctx, struct h_data *h, int maxh,
 }
 
 
-void
+static void
 check_stop_cman(qd_ctx *ctx)
 {
 	if (!(ctx->qc_flags & RF_STOP_CMAN))
@@ -1387,15 +1356,13 @@ main(int argc, char **argv)
 	cman_handle_t ch = NULL;
 	node_info_t ni[MAX_NODES_DISK];
 	struct h_data h[10];
-	char debug = 0, foreground = 0;
+	int debug = 0, foreground = 0;
 	char device[128];
 	pid_t pid;
 	quorum_header_t qh;
 
-	logsys_config_mode_set (LOG_MODE_OUTPUT_STDERR | LOG_MODE_OUTPUT_SYSLOG_THREADED | LOG_MODE_OUTPUT_FILE | LOG_MODE_FLUSH_AFTER_CONFIG);
-
 	if (check_process_running(argv[0], &pid) && pid !=getpid()) {
-		log_printf(LOG_INFO, "QDisk services already running\n");
+		printf("QDisk services already running\n");
 		return 0;
 	}
 
@@ -1423,10 +1390,13 @@ main(int argc, char **argv)
 		}
 	}
 
-	if(debug || getenv("QDISK_DEBUGLOG")) {
+	if(getenv("QDISK_DEBUGLOG"))
 		debug = 1;
+
+	if(debug)
 		logsys_config_priority_set (LOG_LEVEL_DEBUG);
-	}
+
+	logsys_config_mode_set (LOG_MODE_OUTPUT_STDERR | LOG_MODE_OUTPUT_SYSLOG_THREADED | LOG_MODE_OUTPUT_FILE | LOG_MODE_FLUSH_AFTER_CONFIG);
 
 #if (defined(LIBCMAN_VERSION) && LIBCMAN_VERSION >= 2)
 	ch = cman_admin_init(NULL);
@@ -1469,10 +1439,7 @@ main(int argc, char **argv)
 	signal(SIGINT, int_handler);
 	signal(SIGTERM, int_handler);
 
-        if (debug)
-                ctx.qc_flags |= RF_DEBUG;
-
-	if (get_config_data(NULL, &ctx, h, 10, &cfh, debug) < 0) {
+	if (get_config_data(&ctx, h, 10, &cfh, debug) < 0) {
 		log_printf(LOG_CRIT, "Configuration failed\n");
 		check_stop_cman(&ctx);
 		goto out;
diff --git a/cman/qdisk/proc.c b/cman/qdisk/proc.c
index 4cb189a..4ce3d6b 100644
--- a/cman/qdisk/proc.c
+++ b/cman/qdisk/proc.c
@@ -71,7 +71,7 @@ check_device(char *device, char *label, quorum_header_t *qh,
 }
 
 
-void
+static void
 filter_devs(struct devnode *node, void *v_args)
 {
 	struct device_args *args = (struct device_args *)v_args;
@@ -125,7 +125,7 @@ state_str(disk_node_state_t s)
 }
 
 
-void
+static void
 print_status_block(status_block_t *sb)
 {
 	time_t timestamp = (time_t)sb->ps_timestamp;
@@ -149,7 +149,7 @@ print_status_block(status_block_t *sb)
 }
 
 
-void
+static void
 read_info(char *dev)
 {
 	target_info_t ti;
@@ -179,7 +179,7 @@ read_info(char *dev)
 }
 
 
-void
+static void
 print_qdisk_info(struct devnode *dn)
 {
 	quorum_header_t *qh = (quorum_header_t *)dn->filter;
diff --git a/cman/qdisk/score.c b/cman/qdisk/score.c
index 0f91bd6..a27854a 100644
--- a/cman/qdisk/score.c
+++ b/cman/qdisk/score.c
@@ -34,7 +34,7 @@ LOGSYS_DECLARE_SUBSYS ("QDISK", LOG_LEVEL_INFO);
 /*
   XXX Messy, but works for now... 
  */
-void
+static void
 nullify(void)
 {
 	int fd[3];
@@ -59,7 +59,7 @@ nullify(void)
   Set all signal handlers to default for exec of a script.
   ONLY do this after a fork().
  */
-void
+static void
 restore_signals(void)
 {
 	sigset_t set;
@@ -349,7 +349,7 @@ fudge_scoring(void)
 /**
   Loop for the scoring thread.
  */
-void *
+static void *
 score_thread_main(void *arg)
 {
 	struct h_arg *args = (struct h_arg *)arg;
@@ -379,24 +379,6 @@ score_thread_main(void *arg)
 
 
 /**
-  Stop the score thread for shutdown / reconfiguration
- */
-int
-stop_score_thread(void)
-{
-	void *ret;
-
-	if (!_score_thread_running)
-		return 0;
-
-	_score_thread_running = 0;
-	pthread_join(score_thread, &ret);
-
-	return 0;
-}
-
-
-/**
   Start the score thread.  h is copied into an argument which is
   passed in as the arg parameter in the score thread, so it is safe
   to pass in h if it was allocated on the stack.
@@ -437,35 +419,3 @@ start_score_thread(qd_ctx *ctx, struct h_data *h, int count)
 	_score_thread_running = 0;
 	return -1;	
 }
-
-
-#if 0
-int
-main(int argc, char **argv)
-{
-	struct h_data h[10];
-	int max = 0, score, maxscore, ccsfd;
-
-	ccsfd = ccs_force_connect("test", 1);
-	if (ccsfd < 0) 
-		return -1;
-	max = configure_heuristics(ccsfd, h, 10);
-	ccs_disconnect(ccsfd);
-	
-	start_score_thread(h, max);
-	max = 0;
-	while (max < 10) {
-		get_my_score(&score,&maxscore);
-		log_printf(LOG_INFO, "current %d/%d\n", score, maxscore);
-		sleep(1);
-		++max;
-	}
-	stop_score_thread();
-
-	get_my_score(&score,&maxscore);
-	log_printf(LOG_INFO, "final! %d/%d\n", score, maxscore);
-
-	return 0;
-}
-#endif
-
diff --git a/cman/qdisk/score.h b/cman/qdisk/score.h
index 368a9fc..77e155b 100644
--- a/cman/qdisk/score.h
+++ b/cman/qdisk/score.h
@@ -24,11 +24,6 @@ struct h_data {
  */
 int configure_heuristics(int ccsfd, struct h_data *hp, int max);
 
-/* 
-   Stop the thread which runs the scoring applets.
- */
-int stop_score_thread(void);
-
 /*
    Start the thread which runs the scoring applets
  */


hooks/post-receive
--
Cluster Project




More information about the Cluster-devel mailing list