* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-10-20 19:32 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-10-20 19:32 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-20 19:32:52
Modified files:
group/gfs_controld: main.c
Log message:
we weren't cleaning everything up for a client upon POLLUP
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.17&r2=1.18
--- cluster/group/gfs_controld/main.c 2006/10/13 20:00:02 1.17
+++ cluster/group/gfs_controld/main.c 2006/10/20 19:32:52 1.18
@@ -480,7 +480,7 @@
log_error("cpg connection died");
exit_cman();
}
- close(pollfd[i].fd);
+ client_dead(i);
}
}
}
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-12-05 17:26 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-12-05 17:26 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-12-05 17:26:52
Modified files:
group/gfs_controld: main.c
Log message:
change the default plock rate limit from 10 to 100
bz 216052
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.18.4.6&r2=1.18.4.7
--- cluster/group/gfs_controld/main.c 2006/12/01 15:29:14 1.18.4.6
+++ cluster/group/gfs_controld/main.c 2006/12/05 17:26:52 1.18.4.7
@@ -15,7 +15,7 @@
#define OPTION_STRING "DPhVwpl:"
#define LOCKFILE_NAME "/var/run/gfs_controld.pid"
-#define DEFAULT_PLOCK_RATE_LIMIT 10
+#define DEFAULT_PLOCK_RATE_LIMIT 100
struct client {
int fd;
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-12-05 17:26 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-12-05 17:26 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-12-05 17:26:46
Modified files:
group/gfs_controld: main.c
Log message:
change the default plock rate limit from 10 to 100
bz 216052
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.7&r2=1.18.2.8
--- cluster/group/gfs_controld/main.c 2006/12/01 15:29:05 1.18.2.7
+++ cluster/group/gfs_controld/main.c 2006/12/05 17:26:46 1.18.2.8
@@ -15,7 +15,7 @@
#define OPTION_STRING "DPhVwpl:"
#define LOCKFILE_NAME "/var/run/gfs_controld.pid"
-#define DEFAULT_PLOCK_RATE_LIMIT 10
+#define DEFAULT_PLOCK_RATE_LIMIT 100
struct client {
int fd;
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-12-05 16:59 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-12-05 16:59 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-12-05 16:59:54
Modified files:
group/gfs_controld: main.c
Log message:
change the default plock rate limit from 10 to 100
bz 216052
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.25&r2=1.26
--- cluster/group/gfs_controld/main.c 2006/12/01 15:28:58 1.25
+++ cluster/group/gfs_controld/main.c 2006/12/05 16:59:53 1.26
@@ -15,7 +15,7 @@
#define OPTION_STRING "DPhVwpl:"
#define LOCKFILE_NAME "/var/run/gfs_controld.pid"
-#define DEFAULT_PLOCK_RATE_LIMIT 10
+#define DEFAULT_PLOCK_RATE_LIMIT 100
struct client {
int fd;
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-12-01 15:29 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-12-01 15:29 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-12-01 15:29:15
Modified files:
group/gfs_controld: main.c
Log message:
group_tool dump doesn't handle partial reads/writes,
now we always dump entire fixed size debug buffer
bz 214540
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.18.4.5&r2=1.18.4.6
--- cluster/group/gfs_controld/main.c 2006/11/28 20:52:46 1.18.4.5
+++ cluster/group/gfs_controld/main.c 2006/12/01 15:29:14 1.18.4.6
@@ -197,13 +197,13 @@
static int dump_debug(int ci)
{
- int len;
+ int len = DUMP_SIZE;
if (dump_wrap) {
len = DUMP_SIZE - dump_point;
do_write(client[ci].fd, dump_buf + dump_point, len);
+ len = dump_point;
}
- len = dump_point;
do_write(client[ci].fd, dump_buf, len);
return 0;
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-12-01 15:29 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-12-01 15:29 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-12-01 15:29:05
Modified files:
group/gfs_controld: main.c
Log message:
group_tool dump doesn't handle partial reads/writes,
now we always dump entire fixed size debug buffer
bz 214540
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.6&r2=1.18.2.7
--- cluster/group/gfs_controld/main.c 2006/11/28 20:52:39 1.18.2.6
+++ cluster/group/gfs_controld/main.c 2006/12/01 15:29:05 1.18.2.7
@@ -197,13 +197,13 @@
static int dump_debug(int ci)
{
- int len;
+ int len = DUMP_SIZE;
if (dump_wrap) {
len = DUMP_SIZE - dump_point;
do_write(client[ci].fd, dump_buf + dump_point, len);
+ len = dump_point;
}
- len = dump_point;
do_write(client[ci].fd, dump_buf, len);
return 0;
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-12-01 15:28 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-12-01 15:28 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-12-01 15:28:58
Modified files:
group/gfs_controld: main.c
Log message:
group_tool dump doesn't handle partial reads/writes,
now we always dump entire fixed size debug buffer
bz 214540
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.24&r2=1.25
--- cluster/group/gfs_controld/main.c 2006/11/28 20:52:23 1.24
+++ cluster/group/gfs_controld/main.c 2006/12/01 15:28:58 1.25
@@ -197,13 +197,13 @@
static int dump_debug(int ci)
{
- int len;
+ int len = DUMP_SIZE;
if (dump_wrap) {
len = DUMP_SIZE - dump_point;
do_write(client[ci].fd, dump_buf + dump_point, len);
+ len = dump_point;
}
- len = dump_point;
do_write(client[ci].fd, dump_buf, len);
return 0;
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-28 20:52 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-28 20:52 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-11-28 20:52:46
Modified files:
group/gfs_controld: main.c
Log message:
the fix yesterday to prevent a segfault when mount failed mistakenly
also changed the exit point from the function causing the error to not
be written back to mount.gfs
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.18.4.4&r2=1.18.4.5
--- cluster/group/gfs_controld/main.c 2006/11/27 22:43:17 1.18.4.4
+++ cluster/group/gfs_controld/main.c 2006/11/28 20:52:46 1.18.4.5
@@ -293,13 +293,13 @@
/* ci, dir, type, proto, table, extra */
rv = do_mount(ci, argv[1], argv[2], argv[3], argv[4], argv[5],
&mg);
+ fd = client[ci].fd;
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
if (!rv) {
client[ci].mg = mg;
- fd = client[ci].fd;
- fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
mg->mount_client_fd = fd;
- goto reply;
}
+ goto reply;
} else if (!strcmp(cmd, "mount_result")) {
got_mount_result(client[ci].mg, atoi(argv[3]));
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-28 20:52 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-28 20:52 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-11-28 20:52:39
Modified files:
group/gfs_controld: main.c
Log message:
the fix yesterday to prevent a segfault when mount failed mistakenly
also changed the exit point from the function causing the error to not
be written back to mount.gfs
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.5&r2=1.18.2.6
--- cluster/group/gfs_controld/main.c 2006/11/27 22:43:03 1.18.2.5
+++ cluster/group/gfs_controld/main.c 2006/11/28 20:52:39 1.18.2.6
@@ -293,13 +293,13 @@
/* ci, dir, type, proto, table, extra */
rv = do_mount(ci, argv[1], argv[2], argv[3], argv[4], argv[5],
&mg);
+ fd = client[ci].fd;
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
if (!rv) {
client[ci].mg = mg;
- fd = client[ci].fd;
- fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
mg->mount_client_fd = fd;
- goto reply;
}
+ goto reply;
} else if (!strcmp(cmd, "mount_result")) {
got_mount_result(client[ci].mg, atoi(argv[3]));
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-28 20:52 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-28 20:52 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-11-28 20:52:23
Modified files:
group/gfs_controld: main.c
Log message:
the fix yesterday to prevent a segfault when mount failed mistakenly
also changed the exit point from the function causing the error to not
be written back to mount.gfs
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.23&r2=1.24
--- cluster/group/gfs_controld/main.c 2006/11/27 22:42:36 1.23
+++ cluster/group/gfs_controld/main.c 2006/11/28 20:52:23 1.24
@@ -293,13 +293,13 @@
/* ci, dir, type, proto, table, extra */
rv = do_mount(ci, argv[1], argv[2], argv[3], argv[4], argv[5],
&mg);
+ fd = client[ci].fd;
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
if (!rv) {
client[ci].mg = mg;
- fd = client[ci].fd;
- fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
mg->mount_client_fd = fd;
- goto reply;
}
+ goto reply;
} else if (!strcmp(cmd, "mount_result")) {
got_mount_result(client[ci].mg, atoi(argv[3]));
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-27 22:43 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-27 22:43 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL50
Changes by: teigland at sourceware.org 2006-11-27 22:43:17
Modified files:
group/gfs_controld: main.c
Log message:
if mount fails, don't try to save the mg info for the new group
since there won't be any mg and we'll segfault
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL50&r1=1.18.4.3&r2=1.18.4.4
--- cluster/group/gfs_controld/main.c 2006/11/21 17:28:52 1.18.4.3
+++ cluster/group/gfs_controld/main.c 2006/11/27 22:43:17 1.18.4.4
@@ -293,12 +293,13 @@
/* ci, dir, type, proto, table, extra */
rv = do_mount(ci, argv[1], argv[2], argv[3], argv[4], argv[5],
&mg);
- client[ci].mg = mg;
- fd = client[ci].fd;
- fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
- mg->mount_client_fd = fd;
- goto reply;
-
+ if (!rv) {
+ client[ci].mg = mg;
+ fd = client[ci].fd;
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
+ mg->mount_client_fd = fd;
+ goto reply;
+ }
} else if (!strcmp(cmd, "mount_result")) {
got_mount_result(client[ci].mg, atoi(argv[3]));
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-27 22:43 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-27 22:43 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-11-27 22:43:03
Modified files:
group/gfs_controld: main.c
Log message:
if mount fails, don't try to save the mg info for the new group
since there won't be any mg and we'll segfault
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.4&r2=1.18.2.5
--- cluster/group/gfs_controld/main.c 2006/11/21 17:28:45 1.18.2.4
+++ cluster/group/gfs_controld/main.c 2006/11/27 22:43:03 1.18.2.5
@@ -293,12 +293,13 @@
/* ci, dir, type, proto, table, extra */
rv = do_mount(ci, argv[1], argv[2], argv[3], argv[4], argv[5],
&mg);
- client[ci].mg = mg;
- fd = client[ci].fd;
- fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
- mg->mount_client_fd = fd;
- goto reply;
-
+ if (!rv) {
+ client[ci].mg = mg;
+ fd = client[ci].fd;
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
+ mg->mount_client_fd = fd;
+ goto reply;
+ }
} else if (!strcmp(cmd, "mount_result")) {
got_mount_result(client[ci].mg, atoi(argv[3]));
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-27 22:42 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-27 22:42 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-11-27 22:42:36
Modified files:
group/gfs_controld: main.c
Log message:
if mount fails, don't try to save the mg info for the new group
since there won't be any mg and we'll segfault
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.22&r2=1.23
--- cluster/group/gfs_controld/main.c 2006/11/21 17:28:09 1.22
+++ cluster/group/gfs_controld/main.c 2006/11/27 22:42:36 1.23
@@ -293,12 +293,13 @@
/* ci, dir, type, proto, table, extra */
rv = do_mount(ci, argv[1], argv[2], argv[3], argv[4], argv[5],
&mg);
- client[ci].mg = mg;
- fd = client[ci].fd;
- fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
- mg->mount_client_fd = fd;
- goto reply;
-
+ if (!rv) {
+ client[ci].mg = mg;
+ fd = client[ci].fd;
+ fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
+ mg->mount_client_fd = fd;
+ goto reply;
+ }
} else if (!strcmp(cmd, "mount_result")) {
got_mount_result(client[ci].mg, atoi(argv[3]));
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-15 14:32 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-15 14:32 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-11-15 14:32:02
Modified files:
group/gfs_controld: main.c
Log message:
fix sched_priority from sdake
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.20&r2=1.21
--- cluster/group/gfs_controld/main.c 2006/11/14 20:37:27 1.20
+++ cluster/group/gfs_controld/main.c 2006/11/15 14:32:01 1.21
@@ -669,7 +669,7 @@
rv = sched_get_priority_max(SCHED_RR);
if (rv != -1) {
- sched_param.sched_priority = 2;
+ sched_param.sched_priority = rv;
rv = sched_setscheduler(0, SCHED_RR, &sched_param);
if (rv == -1)
log_error("could not set SCHED_RR priority %d err %d",
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-14 21:06 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-14 21:06 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: teigland at sourceware.org 2006-11-14 21:06:39
Modified files:
group/gfs_controld: main.c
Log message:
Default plock rate limit of 10 instead of 0.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.1&r2=1.18.2.2
--- cluster/group/gfs_controld/main.c 2006/11/14 20:33:32 1.18.2.1
+++ cluster/group/gfs_controld/main.c 2006/11/14 21:06:35 1.18.2.2
@@ -15,6 +15,8 @@
#define OPTION_STRING "DPhVwpl:"
#define LOCKFILE_NAME "/var/run/gfs_controld.pid"
+#define DEFAULT_PLOCK_RATE_LIMIT 10
+
struct client {
int fd;
char type[32];
@@ -38,7 +40,7 @@
extern struct list_head withdrawn_mounts;
int no_withdraw;
int no_plock;
-uint32_t plock_rate_limit;
+uint32_t plock_rate_limit = DEFAULT_PLOCK_RATE_LIMIT;
int do_write(int fd, void *buf, size_t count)
@@ -595,6 +597,7 @@
printf(" -P Enable plock debugging\n");
printf(" -p Disable plocks\n");
printf(" -l <limit> Limit the rate of plock operations\n");
+ printf(" Default is %d, set to 0 for no limit\n", DEFAULT_PLOCK_RATE_LIMIT);
printf(" -w Disable withdraw\n");
printf(" -h Print this help, then exit\n");
printf(" -V Print program version information, then exit\n");
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-11-14 20:37 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-11-14 20:37 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-11-14 20:37:27
Modified files:
group/gfs_controld: main.c
Log message:
Default plock rate limit of 10 instead of 0.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.19&r2=1.20
--- cluster/group/gfs_controld/main.c 2006/11/14 20:20:43 1.19
+++ cluster/group/gfs_controld/main.c 2006/11/14 20:37:27 1.20
@@ -15,6 +15,8 @@
#define OPTION_STRING "DPhVwpl:"
#define LOCKFILE_NAME "/var/run/gfs_controld.pid"
+#define DEFAULT_PLOCK_RATE_LIMIT 10
+
struct client {
int fd;
char type[32];
@@ -38,7 +40,7 @@
extern struct list_head withdrawn_mounts;
int no_withdraw;
int no_plock;
-uint32_t plock_rate_limit;
+uint32_t plock_rate_limit = DEFAULT_PLOCK_RATE_LIMIT;
int do_write(int fd, void *buf, size_t count)
@@ -595,6 +597,7 @@
printf(" -P Enable plock debugging\n");
printf(" -p Disable plocks\n");
printf(" -l <limit> Limit the rate of plock operations\n");
+ printf(" Default is %d, set to 0 for no limit\n", DEFAULT_PLOCK_RATE_LIMIT);
printf(" -w Disable withdraw\n");
printf(" -h Print this help, then exit\n");
printf(" -V Print program version information, then exit\n");
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-10-06 14:43 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-10-06 14:43 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-10-06 14:43:59
Modified files:
group/gfs_controld: main.c
Log message:
make the number of clients a global variable so it will be easier
to add clients later
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.14&r2=1.15
--- cluster/group/gfs_controld/main.c 2006/09/08 22:44:33 1.14
+++ cluster/group/gfs_controld/main.c 2006/10/06 14:43:58 1.15
@@ -20,6 +20,7 @@
char type[32];
};
+static int client_maxi;
static int client_size = 0;
static struct client *client = NULL;
static struct pollfd *pollfd = NULL;
@@ -107,7 +108,7 @@
return rp;
}
-static int client_add(int fd, int *maxi)
+static int client_add(int fd)
{
int i;
@@ -118,8 +119,8 @@
client[i].fd = fd;
pollfd[i].fd = fd;
pollfd[i].events = POLLIN;
- if (i > *maxi)
- *maxi = i;
+ if (i > client_maxi)
+ client_maxi = i;
return i;
}
}
@@ -380,42 +381,42 @@
int loop(void)
{
- int rv, i, f, maxi = 0;
+ int rv, i, f;
rv = listen_fd = setup_listen();
if (rv < 0)
goto out;
- client_add(listen_fd, &maxi);
+ client_add(listen_fd);
rv = cman_fd = setup_cman();
if (rv < 0)
goto out;
- client_add(cman_fd, &maxi);
+ client_add(cman_fd);
rv = cpg_fd = setup_cpg();
if (rv < 0)
goto out;
- client_add(cpg_fd, &maxi);
+ client_add(cpg_fd);
rv = groupd_fd = setup_groupd();
if (rv < 0)
goto out;
- client_add(groupd_fd, &maxi);
+ client_add(groupd_fd);
rv = uevent_fd = setup_uevent();
if (rv < 0)
goto out;
- client_add(uevent_fd, &maxi);
+ client_add(uevent_fd);
rv = plocks_fd = setup_plocks();
if (rv < 0)
goto out;
- client_add(plocks_fd, &maxi);
+ client_add(plocks_fd);
log_debug("setup done");
for (;;) {
- rv = poll(pollfd, maxi + 1, -1);
+ rv = poll(pollfd, client_maxi + 1, -1);
if (rv < 0)
log_error("poll error %d errno %d", rv, errno);
@@ -426,10 +427,10 @@
if (f < 0)
log_debug("accept error %d %d", f, errno);
else
- client_add(f, &maxi);
+ client_add(f);
}
- for (i = 1; i <= maxi; i++) {
+ for (i = 1; i <= client_maxi; i++) {
if (client[i].fd < 0)
continue;
^ permalink raw reply [flat|nested] 18+ messages in thread* [Cluster-devel] cluster/group/gfs_controld main.c
@ 2006-08-31 18:46 teigland
0 siblings, 0 replies; 18+ messages in thread
From: teigland @ 2006-08-31 18:46 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: teigland at sourceware.org 2006-08-31 18:46:24
Modified files:
group/gfs_controld: main.c
Log message:
tidy up a couple style things
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.11&r2=1.12
--- cluster/group/gfs_controld/main.c 2006/08/31 18:17:32 1.11
+++ cluster/group/gfs_controld/main.c 2006/08/31 18:46:24 1.12
@@ -89,8 +89,8 @@
{
int i;
- while (1) { /* I hate gotos */
- /* This is expected to fail the first time, with nothing allocated: */
+ while (1) {
+ /* This fails the first time with client_size of zero */
for (i = 0; i < client_size; i++) {
if (client[i].fd == -1) {
client[i].fd = fd;
@@ -98,22 +98,25 @@
pollfd[i].events = POLLIN;
if (i > *maxi)
*maxi = i;
- /* log_debug("client %d fd %d added", i, fd); */
return i;
}
}
+
/* We didn't find an empty slot, so allocate more. */
client_size += MAX_CLIENTS;
+
if (!client) {
client = malloc(client_size * sizeof(struct client));
pollfd = malloc(client_size * sizeof(struct pollfd));
- }
- else {
- client = realloc(client, client_size * sizeof(struct client));
- pollfd = realloc(pollfd, client_size * sizeof(struct pollfd));
+ } else {
+ client = realloc(client, client_size *
+ sizeof(struct client));
+ pollfd = realloc(pollfd, client_size *
+ sizeof(struct pollfd));
}
if (!client || !pollfd)
log_error("Can't allocate client memory.");
+
for (i = client_size - MAX_CLIENTS; i < client_size; i++) {
client[i].fd = -1;
pollfd[i].fd = -1;
@@ -129,14 +132,6 @@
pollfd[ci].fd = -1;
}
-static void client_init(void)
-{
- int i;
-
- for (i = 0; i < client_size; i++)
- client[i].fd = -1;
-}
-
int client_send(int ci, char *buf, int len)
{
return write(client[ci].fd, buf, len);
@@ -586,7 +581,6 @@
prog_name = argv[0];
INIT_LIST_HEAD(&mounts);
INIT_LIST_HEAD(&withdrawn_mounts);
- client_init();
decode_arguments(argc, argv);
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2006-12-05 17:26 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-20 19:32 [Cluster-devel] cluster/group/gfs_controld main.c teigland
-- strict thread matches above, loose matches on Subject: below --
2006-12-05 17:26 teigland
2006-12-05 17:26 teigland
2006-12-05 16:59 teigland
2006-12-01 15:29 teigland
2006-12-01 15:29 teigland
2006-12-01 15:28 teigland
2006-11-28 20:52 teigland
2006-11-28 20:52 teigland
2006-11-28 20:52 teigland
2006-11-27 22:43 teigland
2006-11-27 22:43 teigland
2006-11-27 22:42 teigland
2006-11-15 14:32 teigland
2006-11-14 21:06 teigland
2006-11-14 20:37 teigland
2006-10-06 14:43 teigland
2006-08-31 18:46 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 NNTP newsgroup(s).