[Openais] [PATCH 4/4] sync.c: avoid printf format warning

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/sync.c (sync_deliver_fn): cast to unsigned long int, use %lu --- exec/sync.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/exec/sync.c b/exec/sync.c index a7d7f6b..6521c84 100644 --- a/exec/sync.c +++ b/exec/sync.c @@

[Openais] [PATCH 3/4] sync.c: avoid warning about now-unused variables

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/sync.c (vsf_none, vsf_iface): Remove decls of now-unused file-scoped variables. --- exec/sync.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/exec/sync.c b/exec/sync.c index 21a1a67..a7d7f6b 100644 --- a/exec/sync.c +++

[Openais] making all iov_len unsigned int; not int and not size_t

2009-04-08 Thread Jim Meyering
These changes make all iov_len (and iov_len_in) variables be of type unsigned int. I performed the changes mechanically after verifying yesterday by a relatively quick code inspection that the signed-unsigned change would be ok. There were also some declarations that were of type size_t

[Openais] [PATCH 1/4] Convert all int iov_len decls to unsigned int iov_len.

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Used this command: git grep -l 'int iov_len' \ | xargs perl -pi -e 's/((?:^|,)\s*)(int iov_len)/${1}unsigned $2/' Here's an approximate (autogenerated by vc-chlog) list of affected file names and functions/macros: * README.devmap: * exec/coroipcs.c

Re: [Openais] OpenAIS whitetank - cpg.c bug

2009-04-08 Thread Chrissie Caulfield
Steven Dake wrote: On Tue, 2009-04-07 at 16:53 +0200, Jan Friesse wrote: Attached is workaround for cpg.c bug causing sig... Why I call it workaround and not patch? Because it's not real patch solving root of problem. This doesn't solve the root of the problem. IMO there is a design

Re: [Openais] howto distribute data accross all nodes?

2009-04-08 Thread Steven Dake
On Wed, 2009-04-08 at 11:02 +0200, Dietmar Maurer wrote: Hi all, each node in my cluster has some data which should be available to all nodes. I also want to update that data in a consistent/atomic way: 1.) acquire global lock 2.) read/update/write data 3.) release lock Virtual

Re: [Openais] [PATCH 4/4] sync.c: avoid printf format warning

2009-04-08 Thread Steven Dake
this patch set 1-4 looks good. Regards -steve On Wed, 2009-04-08 at 09:50 +0200, Jim Meyering wrote: From: Jim Modyering meyer...@redhat.com * exec/sync.c (sync_deliver_fn): cast to unsigned long int, use %lu --- exec/sync.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

[Openais] [PATCH 04/11] totemconfig.c: don't let a key of length 128 clobber memory

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/totemconfig.c (totem_config_keyread): Reject a key with length greater than that of our private_key buffer. --- exec/totemconfig.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/exec/totemconfig.c b/exec/totemconfig.c

[Openais] another big batch of API changes

2009-04-08 Thread Jim Meyering
Here is what should be the last big public API change. I've tried to separate the change-sets that modify public .h files from those that adjust corresponding .c files, in an attempt to make this easier to review. Of course, one consequence is that after applying 0007 and 0009, but without the

[Openais] [PATCH 05/11] totemconfig.c: don't hard-code 128...

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/totemconfig.c (read_keyfile): Don't hard-code 128. Use sizeof(...) instead. Avoid duplicate close(fd) calls. --- exec/totemconfig.c | 17 ++--- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/exec/totemconfig.c

[Openais] [PATCH 01/11] rmd.h: adjust types (const+size_t) of prototype

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * include/corosync/rmd.h: ...even though there are no definitions for these functions. --- include/corosync/rmd.h | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/corosync/rmd.h b/include/corosync/rmd.h index

[Openais] [PATCH 09/11] cpg.h, coroapi.h: more size_t and const changes

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * include/corosync/cpg.h (cpg_deliver_fn_t, cpg_confchg_fn_t) (cpg_groups_get_fn_t): * include/corosync/engine/coroapi.h (ipc_response_send) (ipc_dispatch_send, tpg_join, tpg_leave, tpg_groups_mcast) (tpg_groups_reserve): --- include/corosync/cpg.h

[Openais] [PATCH 06/11] coroapi.h, confdb.h, objdb.h: big s/int/size_t/ change

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/mainconfig.c (objdb_get_string, objdb_get_int): * exec/totemconfig.c (objdb_get_string, objdb_get_int) (totem_config_keyread, totem_key_change_notify): * include/corosync/confdb.h (confdb_callbacks_t): * include/corosync/engine/coroapi.h (group_len,

[Openais] [PATCH 07/11] make all priv_data_pt pointers non-const

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com I'd suspected this would be necessary, but until now hadn't found a case in which it actually was. That case: totemconfig.c's totem_key_change_notify. It has a priv_data_pt parameter that is used like this: struct totem_config *totem_config =

[Openais] [PATCH 03/11] totem.h: use symbolic array dimensions in public struct members

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * include/corosync/totem/totem.h: (TOTEM_PRIVATE_KEY_LEN, TOTEM_RRP_MODE_BYTES): Define. (struct totem_config): Use the new names, rather than literals. --- include/corosync/totem/totem.h |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-)

[Openais] [PATCH 10/11] sync the rest of the code with previous header changes

2009-04-08 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * exec/coroipcs.c (coroipcs_response_send) (coroipcs_dispatch_send): * exec/coroipcs.h (handler_fn_get): * include/corosync/cpg.h (cpg_deliver_fn_t, cpg_confchg_fn_t): * test/cpgbench.c (cpg_bm_confchg_fn, cpg_bm_deliver_fn): * test/testcpg.c (print_cpgname,

Re: [Openais] [PATCH 11/11] coroipcc.h (coroipcc_msg_send_reply_receive): Make res_len size_t.

2009-04-08 Thread Steven Dake
this patchset looks good Regards -steve On Wed, 2009-04-08 at 18:53 +0200, Jim Meyering wrote: From: Jim Meyering meyer...@redhat.com * include/corosync/coroipcc.h (coroipcc_msg_send_reply_receive): change type of res_len parameter. * lib/coroipcc.c (coroipcc_reply_receive): Likewise. ---

Re: [Openais] [PATCH 11/11] coroipcc.h (coroipcc_msg_send_reply_receive): Make res_len size_t.

2009-04-08 Thread Jim Meyering
Steven Dake wrote: this patchset looks good Thanks for the quick review. I'm committing those 11 change sets now. ___ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais

[Openais] detecting cpg joiners

2009-04-08 Thread Joel Becker
Steve, Dave, etc, Someone told me a while back that a node joining a cpg group would be by its lonesome in the join message. That is, when the node gets its first confchg, it will be the only node in the list of joins. I've been using this to detect the first joiner of the group (I

[Openais] [openais trunk] change COROSYNC to OPENAIS definition

2009-04-08 Thread Steven Dake
The code depends on the defines OPENAIS* but instead COROSYNC is defined in configure.ac. Index: configure.ac === --- configure.ac (revision 1777) +++ configure.ac (working copy) @@ -188,7 +188,7 @@ case $host_os in *linux*) -

[Openais] [openais trunk] fix msg.c to match upstream corosync typechanges

2009-04-08 Thread Steven Dake
similar to other changes. Note Ryan that the confchg function is not proper in this code. Look at the TODO and see if you can fix it up. member_list should not be modified by the confchg function. Regards -steve Index: services/msg.c

[Openais] [openais trunk] constify openaisserviceenable default config values

2009-04-08 Thread Steven Dake
changes two types to const which are in fact constant. Index: services/openaisserviceenable.c === --- services/openaisserviceenable.c (revision 1778) +++ services/openaisserviceenable.c (working copy) @@ -52,8 +52,8 @@ static char

[Openais] [openais trunk] remove warnings from openaisparser.c

2009-04-08 Thread Steven Dake
see patch and subject. Index: services/openaisparser.c === --- services/openaisparser.c (revision 1778) +++ services/openaisparser.c (working copy) @@ -51,10 +51,10 @@ static int read_config_file_into_objdb( struct

[Openais] [openais trunk] amf typechanges to run properly

2009-04-08 Thread Steven Dake
Index: services/amf.c === --- services/amf.c (revision 1778) +++ services/amf.c (working copy) @@ -179,10 +179,10 @@ struct corosync_api_v1 *api; static void amf_confchg_fn ( enum totem_configuration_type configuration_type, -

[Openais] [openais trunk] event typing changes to match corosync

2009-04-08 Thread Steven Dake
see previous patches. Index: services/evt.c === --- services/evt.c (revision 1778) +++ services/evt.c (working copy) @@ -110,10 +110,10 @@ static void evt_conf_change( enum totem_configuration_type configuration_type, -

[Openais] [openais trunk] typechanges for event service engine

2009-04-08 Thread Steven Dake
see subject Index: services/lck.c === --- services/lck.c (revision 1778) +++ services/lck.c (working copy) @@ -143,11 +143,11 @@ static unsigned int my_lowest_nodeid = 0; static void message_handler_req_exec_lck_resourceopen ( -

Re: [Openais] [openais trunk] fix msg.c to match upstream corosync typechanges

2009-04-08 Thread Ryan O'Hara
On Wed, Apr 08, 2009 at 07:26:26PM -0700, Steven Dake wrote: similar to other changes. Note Ryan that the confchg function is not proper in this code. Look at the TODO and see if you can fix it up. member_list should not be modified by the confchg function. Agreed. Looks like I coded it