cluster/cman man/mkqdisk.8 man/qdisk.5 qdisk/M ...
CVSROOT: /cvs/cluster
Module name: cluster
Branch: STABLE
Changes by: lhh at sourceware.org 2007-01-22 23:01:54
Modified files:
cman/man : mkqdisk.8 qdisk.5
cman/qdisk : Makefile clulog.c disk.h gettid.c main.c
mkqdisk.c score.c score.h
Added files:
cman/qdisk : daemon_init.c
Log message:
Merge qdisk fixes from RHEL4 branch
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/man/mkqdisk.8.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.4.1&r2=1.2.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/man/qdisk.5.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.4.1&r2=1.2.4.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/daemon_init.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=NONE&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/Makefile.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.5.2.1&r2=1.5.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/clulog.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/disk.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.1&r2=1.3.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/gettid.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.4.2.1&r2=1.4.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/main.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.1&r2=1.3.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/mkqdisk.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.3.2.1&r2=1.3.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/score.c.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman/qdisk/score.h.diff?cvsroot=cluster&only_with_tag=STABLE&r1=1.2.2.1&r2=1.2.2.2
cman/man/mkqdisk.8 +8 -3
@@ -13,11 +13,16 @@ .IP "\-c device \-l label" Initialize a new cluster quorum disk. This will destroy all data on the given device. If a cluster is currently using that device as a quorum disk, the -entire cluster will malfunction. Do not ru +entire cluster will malfunction. Do not run this on an active cluster when +qdiskd is running. Only one device on the SAN should ever have the given +label; using multiple different devices is currently not supported (it is +expected a RAID array is used for quorum disk redundancy). The label can be +any textual string up to 127 characters - and is therefore enough space to hold +a UUID created with uuidgen(1). .IP "\-f label" -Find the cluster quorum disk with the given label and display information about it.. +Find the cluster quorum disk with the given label and display information about it. .IP "\-L" Display information on all accessible cluster quorum disks. .SH "SEE ALSO" -qdisk(5) qdiskd(8) +qdisk(5), qdiskd(8), uuidgen(1)
cman/man/qdisk.5 +123 -17
208 lines not on this page · raw message
/cvs/cluster/cluster/cman/qdisk/daemon_init.c,v --> standard output revision 1.2.2.1
- renamed from cman/qdisk/daemon_init.c +238 -0
238 lines not on this page · raw message
cman/qdisk/Makefile +11 -1
@@ -19,6 +19,16 @@ CFLAGS +=-I${incdir} -I${top_srcdir}/config \ -Wall -Werror -Wstrict-prototypes -Wshadow -D_GNU_SOURCE -g +ifneq (${KERNEL_SRC}, ) +# Use the kernel tree if patched, otherwise, look where cluster headers +# should be installed +CFLAGS += $(shell if [ -d ${KERNEL_SRC}/include/cluster ]; then \ + echo '-I${KERNEL_SRC}/include/cluster'; else \ + echo '-I${incdir}/cluster'; fi) +else +CFLAGS += -I${incdir}/cluster +endif + TARGET=qdiskd mkqdisk all: ${TARGET}
@@ -31,7 +41,7 @@ install ${TARGET} ${sbindir} qdiskd: disk.o crc32.o disk_util.o main.o score.o bitmap.o clulog.o \ - gettid.o proc.o ../lib/libcman.a + gettid.o proc.o daemon_init.o ../lib/libcman.a gcc -o $@ $^ -lpthread -L../lib -lccs mkqdisk: disk.o crc32.o disk_util.o \
cman/qdisk/clulog.c +1 -6
@@ -20,8 +20,6 @@/** @file * Library routines for communicating with the logging daemon. * -* $Id: clulog.c,v 1.2.2.1 2006/07/21 18:01:38 lhh Exp $ -* * Author: Jeff Moyer <[email protected]> */ #include <stdio.h>
@@ -50,8 +48,6 @@#include <string.h> -static const char *version __attribute__ ((unused)) = "$Revision: 1.2.2.1 $"; -#ifdef DEBUG #include <assert.h> #define Dprintf(fmt,args...) printf(fmt,##args)
@@ -135,7 +131,7 @@ }pthread_mutex_unlock (&log_mutex); -return "local4" ; +return "daemon" ; }
@@ -156,7 +152,6 @@for (; facilitynames[x].c_name; x++) {if (strcmp (facilityname, facilitynames[x].c_name))continue ; - syslog_facility = facilitynames[x].c_val;break ; }
cman/qdisk/disk.h +12 -1
@@ -66,6 +66,15 @@ } disk_state_flag_t; +typedef enum { +RF_REBOOT =0x1 ,/* Reboot if we go from master->none */ +RF_STOP_CMAN =0x2 , +RF_DEBUG =0x4 , +RF_PARANOID =0x8 , +RF_ALLOW_KILL =0x10 +}run_flag_t ; + +/* RHEL 2.1 / RHCS3 old magic numbers */ #define HEADER_MAGIC_OLD 0x39119FCD/* partition header */ #define STATE_MAGIC_OLD 0xF1840DCE/* Status block */
@@ -232,10 +241,12 @@int qc_tko;int qc_votes;int qc_scoremin; +int qc_sched; +int qc_sched_prio;disk_node_state_t qc_disk_status;disk_node_state_t qc_status;int qc_master;/* Master?! */ -int qc_unused; +run_flag_t qc_flags;cman_handle_t qc_ch;char *qc_device;char *qc_label;
cman/qdisk/gettid.c +1 -1
@@ -2,8 +2,8 @@#include <sys/syscall.h> #include <linux/unistd.h> #include <gettid.h> -#include <errno.h> #include <unistd.h> +#include <errno.h> /* Patch from Adam Conrad / Ubuntu: Don't use _syscall macro */
cman/qdisk/main.c +434 -48
753 lines not on this page · raw message
cman/qdisk/mkqdisk.c +3 -3
@@ -39,9 +39,9 @@char *newdev =NULL , *newlabel =NULL ;int rv; -printf ("mkqdisk v0.5\n" ); +printf ("mkqdisk v0.5.1\n" ); -while ((rv =getopt (argc, argv,"Lfc:l:h" )) !=EOF ) { +while ((rv =getopt (argc, argv,"Lf:c:l:h" )) !=EOF ) {switch (rv) {case 'L' :/* List */
@@ -53,7 +53,7 @@close (2 );return find_partitions ("/proc/partitions" , optarg, device, -sizeof (device),0 ); +sizeof (device),1 );case 'c' : newdev = optarg;break ;
cman/qdisk/score.c +83 -10
168 lines not on this page · raw message
cman/qdisk/score.h +3 -1
@@ -32,7 +32,9 @@char * program;int score;int available; +int tko;int interval; +int misses;pid_t childpid;time_t nextrun; };
@@ -50,7 +52,7 @@/* Start the thread which runs the scoring applets */ -int start_score_thread (struct h_data *h,int count); +int start_score_thread (qd_ctx *ctx,struct h_data *h,int count);/* Get our score + maxscore