[-]
[+]
|
Changed |
openais.spec
|
|
[-]
[+]
|
Added |
openais-0.76-defaultconfig.patch
^
|
@@ -0,0 +1,14 @@
+Index: conf/openais.conf
+===================================================================
+--- conf/openais.conf (revision 1048)
++++ conf/openais.conf (working copy)
+@@ -13,9 +13,6 @@
+ }
+
+ logging {
+- to_stderr: yes
+- to_file: yes
+- logfile: /tmp/ais
+ debug: off
+ timestamp: on
+ }
|
[-]
[+]
|
Added |
openais-makefile.patch
^
|
@@ -0,0 +1,128 @@
+--- whitetank-svn/Makefile 2008-08-13 22:38:16.000000000 +0200
++++ whitetank-dev/Makefile 2008-11-19 11:54:17.000000000 +0100
+@@ -29,30 +29,30 @@
+ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ # THE POSSIBILITY OF SUCH DAMAGE.
+
+-DESTDIR=/usr/local
+-SBINDIR=/usr/sbin
+-INCLUDEDIR=/usr/include/openais
+-INCLUDEDIR_TOTEM=/usr/include/openais/totem
+-INCLUDEDIR_LCR=/usr/include/openais/lcr
+-INCLUDEDIR_SERVICE=/usr/include/openais/service
+-MANDIR=/usr/share/man
++include Makefile.inc
++
++SBINDIR=$(PREFIX)/sbin
++INCLUDEDIR=$(PREFIX)/include/openais
++INCLUDEDIR_TOTEM=$(PREFIX)/include/openais/totem
++INCLUDEDIR_LCR=$(PREFIX)/include/openais/lcr
++INCLUDEDIR_SERVICE=$(PREFIX)/include/openais/service
++MANDIR=$(PREFIX)/share/man
+ ETCDIR=/etc/ais
+-LCRSODIR=/usr/libexec/lcrso
+ ARCH=$(shell uname -p)
+
+ ifeq (,$(findstring 64,$(ARCH)))
+-LIBDIR=/usr/lib/openais
++LIBDIR=$(PREFIX)/lib/openais
+ else
+-LIBDIR=/usr/lib64/openais
++LIBDIR=$(PREFIX)/lib64/openais
+ endif
+ ifeq (s390,$(ARCH))
+-LIBDIR=/usr/lib/openais
++LIBDIR=$(PREFIX)/lib/openais
+ endif
+ ifeq (s390x,$(ARCH))
+-LIBDIR=/usr/lib64/openais
++LIBDIR=$(PREFIX)/lib64/openais
+ endif
+ ifeq (ia64,$(ARCH))
+-LIBDIR=/usr/lib/openais
++LIBDIR=$(PREFIX)/lib/openais
+ endif
+
+ all:
+@@ -106,29 +106,29 @@ install:
+ ln -sf libcfg.so.2.0.0 lib/libcfg.so.2
+ ln -sf libtotem_pg.so.2.0.0 exec/libtotem_pg.so.2
+
+- cp -a lib/libais.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaAmf.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaClm.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaCkpt.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaEvt.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaLck.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaMsg.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libevs.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libcpg.so $(DESTDIR)$(LIBDIR)
+- cp -a lib/libcfg.so $(DESTDIR)$(LIBDIR)
+- cp -a exec/libtotem_pg.so $(DESTDIR)$(LIBDIR)
+-
+- cp -a lib/libais.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaAmf.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaClm.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaCkpt.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaEvt.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaLck.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libSaMsg.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libevs.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libcpg.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a lib/libcfg.so.2 $(DESTDIR)$(LIBDIR)
+- cp -a exec/libtotem_pg.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libais.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaAmf.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaClm.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaCkpt.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaEvt.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaLck.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaMsg.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libevs.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libcpg.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libcfg.so $(DESTDIR)$(LIBDIR)
++ $(CP) -a exec/libtotem_pg.so $(DESTDIR)$(LIBDIR)
++
++ $(CP) -a lib/libais.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaAmf.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaClm.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaCkpt.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaEvt.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaLck.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libSaMsg.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libevs.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libcpg.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a lib/libcfg.so.2 $(DESTDIR)$(LIBDIR)
++ $(CP) -a exec/libtotem_pg.so.2 $(DESTDIR)$(LIBDIR)
+
+ install -m 755 lib/libais.so.2.* $(DESTDIR)$(LIBDIR)
+ install -m 755 lib/libSaAmf.so.2.* $(DESTDIR)$(LIBDIR)
+@@ -158,7 +158,7 @@ ifneq "NO" "$(STATICLIBS)"
+ install -m 755 exec/libtotem_pg.a $(DESTDIR)$(LIBDIR)
+ endif
+
+- echo $(LIBDIR) > $(DESTDIR)/etc/ld.so.conf.d/openais-$(ARCH).conf
++ echo $(LIBDIR) > "$(DESTDIR)/etc/ld.so.conf.d/openais-$(ARCH).conf"
+
+ install -m 755 exec/*lcrso $(DESTDIR)$(LCRSODIR)
+
+--- whitetank-svn/Makefile.inc 2008-08-13 22:38:16.000000000 +0200
++++ whitetank-dev/Makefile.inc 2008-11-19 11:54:17.000000000 +0100
+@@ -29,12 +29,17 @@
+ # THE POSSIBILITY OF SUCH DAMAGE.
+ # Basic OS detection
+ #
++CP=cp
++DESTDIR=
++PREFIX=/usr/local
+ UNAME=$(shell uname)
++LCRSODIR=$(PREFIX)/libexec/lcrso
+
+ ifeq "$(UNAME)" "Linux"
+ OPENAIS_COMPAT=LINUX
+ endif
+ ifeq "$(UNAME)" "Darwin"
++ CP=rsync
+ OPENAIS_COMPAT=DARWIN
+ endif
+ ifneq "" "$(findstring BSD,$(UNAME))"
|
[-]
[+]
|
Added |
revision-1406.patch
^
|
@@ -0,0 +1,76 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1405)
++++ exec/totemsrp.c (revision 1406)
+@@ -393,8 +393,6 @@
+
+ unsigned int my_token_seq;
+
+- unsigned int my_commit_token_seq;
+-
+ /*
+ * Timers
+ */
+@@ -619,8 +617,6 @@
+
+ instance->my_token_seq = SEQNO_START_TOKEN - 1;
+
+- instance->my_commit_token_seq = SEQNO_START_TOKEN - 1;
+-
+ instance->memb_state = MEMB_STATE_OPERATIONAL;
+
+ instance->set_aru = -1;
+@@ -1646,8 +1642,6 @@
+ struct totemsrp_instance *instance,
+ int gather_from)
+ {
+- instance->my_commit_token_seq = SEQNO_START_TOKEN - 1;
+-
+ memb_set_merge (
+ &instance->my_id, 1,
+ instance->my_proc_list, &instance->my_proc_list_entries);
+@@ -1733,8 +1727,6 @@
+
+ instance->memb_state = MEMB_STATE_COMMIT;
+
+- instance->my_commit_token_seq = SEQNO_START_TOKEN - 1;
+-
+ /*
+ * reset all flow control variables since we are starting a new ring
+ */
+@@ -3961,16 +3953,6 @@
+ addr = (struct srp_addr *)memb_commit_token->end_of_commit_token;
+ memb_list = (struct memb_commit_token_memb_entry *)(addr + memb_commit_token->addr_entries);
+
+- if (sq_lte_compare (memb_commit_token->token_seq,
+- instance->my_commit_token_seq)) {
+- /*
+- * discard token
+- */
+- return (0);
+- }
+- instance->my_commit_token_seq = memb_commit_token->token_seq;
+-
+-
+ #ifdef TEST_DROP_COMMIT_TOKEN_PERCENTAGE
+ if (random()%100 < TEST_DROP_COMMIT_TOKEN_PERCENTAGE) {
+ return (0);
+@@ -3998,9 +3980,15 @@
+ break;
+
+ case MEMB_STATE_COMMIT:
+-// if (memcmp (&memb_commit_token->ring_id, &instance->my_ring_id,
+-// sizeof (struct memb_ring_id)) == 0) {
+- if (memb_commit_token->ring_id.seq == instance->my_ring_id.seq) {
++ /*
++ * If retransmitted commit tokens are sent on this ring
++ * filter them out and only enter recovery once the
++ * commit token has traversed the array. This is
++ * determined by :
++ * memb_commit_token->memb_index == memb_commit_token->addr_entries) {
++ */
++ if (memb_commit_token->ring_id.seq == instance->my_ring_id.seq &&
++ memb_commit_token->memb_index == memb_commit_token->addr_entries) {
+ memb_state_recovery_enter (instance, memb_commit_token);
+ }
+ break;
|
[-]
[+]
|
Added |
revision-1407.patch
^
|
@@ -0,0 +1,13 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1406)
++++ exec/totemsrp.c (revision 1407)
+@@ -1548,6 +1548,8 @@
+ unsigned int new_memb_list_totemip[PROCESSOR_COUNT_MAX];
+ unsigned int left_list[PROCESSOR_COUNT_MAX];
+
++ memb_consensus_reset (instance);
++
+ old_ring_state_reset (instance);
+ ring_reset (instance);
+ deliver_messages_from_recovery_to_regular (instance);
|
[-]
[+]
|
Added |
revision-1408.patch
^
|
@@ -0,0 +1,70 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1407)
++++ exec/totemsrp.c (revision 1408)
+@@ -549,7 +549,8 @@
+ int fcc_mcasts_allowed);
+ static void messages_free (struct totemsrp_instance *instance, unsigned int token_aru);
+
+-static void memb_ring_id_store (struct totemsrp_instance *instance);
++static void memb_ring_id_set_and_store (struct totemsrp_instance *instance,
++ struct memb_ring_id *ring_id);
+ static void memb_state_commit_token_update (struct totemsrp_instance *instance, struct memb_commit_token *commit_token);
+ static void memb_state_commit_token_target_set (struct totemsrp_instance *instance, struct memb_commit_token *commit_token);
+ static int memb_state_commit_token_send (struct totemsrp_instance *instance, struct memb_commit_token *memb_commit_token);
+@@ -1707,10 +1708,10 @@
+
+ memb_state_commit_token_target_set (instance, commit_token);
+
++ memb_ring_id_set_and_store (instance, &commit_token->ring_id);
++
+ memb_state_commit_token_send (instance, commit_token);
+
+- memcpy (&instance->my_ring_id, &commit_token->ring_id,
+- sizeof (struct memb_ring_id));
+ instance->token_ring_id_seq = instance->my_ring_id.seq;
+
+ poll_timer_delete (instance->totemsrp_poll_handle, instance->memb_timer_state_gather_join_timeout);
+@@ -1920,7 +1921,6 @@
+
+ reset_token_timeout (instance); // REVIEWED
+ reset_token_retransmit_timeout (instance); // REVIEWED
+- memb_ring_id_store (instance);
+
+ instance->memb_state = MEMB_STATE_RECOVERY;
+ return;
+@@ -2829,6 +2829,7 @@
+ }
+ res = write (fd, &memb_ring_id->seq, sizeof (unsigned long long));
+ assert (res == sizeof (unsigned long long));
++ fsync (fd);
+ close (fd);
+ } else {
+ log_printf (instance->totemsrp_log_level_warning,
+@@ -2840,13 +2841,16 @@
+ instance->token_ring_id_seq = memb_ring_id->seq;
+ }
+
+-static void memb_ring_id_store (
+- struct totemsrp_instance *instance)
++static void memb_ring_id_set_and_store (
++ struct totemsrp_instance *instance,
++ struct memb_ring_id *ring_id)
+ {
+ char filename[256];
+ int fd;
+ int res;
+
++ memcpy (&instance->my_ring_id, ring_id, sizeof (struct memb_ring_id));
++
+ sprintf (filename, "%s/ringid_%s",
+ rundir, totemip_print (&instance->my_id.addr[0]));
+
+@@ -2866,6 +2870,7 @@
+ //assert (fd > 0);
+ res = write (fd, &instance->my_ring_id.seq, sizeof (unsigned long long));
+ assert (res == sizeof (unsigned long long));
++ fsync (fd);
+ close (fd);
+ }
+
|
[-]
[+]
|
Added |
revision-1409.patch
^
|
@@ -0,0 +1,20 @@
+Index: exec/totempg.c
+===================================================================
+--- exec/totempg.c (revision 1408)
++++ exec/totempg.c (revision 1409)
+@@ -870,13 +870,14 @@
+ /*
+ * Determine if a message of msg_size could be queued
+ */
++#define FUZZY_AVAIL_SUBTRACT 5
+ static int send_ok (
+ int msg_size)
+ {
+ int avail = 0;
+ int total;
+
+- avail = totemmrp_avail ();
++ avail = totemmrp_avail () - FUZZY_AVAIL_SUBTRACT;
+
+ /*
+ * msg size less then totempg_totem_config->net_mtu - 25 will take up
|
[-]
[+]
|
Added |
revision-1410.patch
^
|
@@ -0,0 +1,13 @@
+Index: test/testckpt.c
+===================================================================
+--- test/testckpt.c (revision 1409)
++++ test/testckpt.c (revision 1410)
+@@ -341,7 +341,7 @@
+ timersub (&tv_end, &tv_start, &tv_elapsed);
+ printf ("Elapsed Time to expiry is %ld & %ld usec (should be about %d seconds)\n",
+ tv_elapsed.tv_sec,
+- tv_elapsed.tv_usec,
++ (long) tv_elapsed.tv_usec,
+ SECONDS_TO_EXPIRE);
+
+ error = saCkptCheckpointRetentionDurationSet (checkpointHandle,
|
[-]
[+]
|
Added |
revision-1413.patch
^
|
@@ -0,0 +1,190 @@
+Index: exec/ipc.c
+===================================================================
+--- exec/ipc.c (revision 1410)
++++ exec/ipc.c (revision 1413)
+@@ -369,7 +369,8 @@
+
+ pthread_attr_destroy (&conn_info->thread_attr);
+ pthread_mutex_destroy (&conn_info->mutex);
+-
++ pthread_mutex_destroy (&conn_info->flow_control_mutex);
++
+ list_del (&conn_info->list);
+ free (conn_info);
+ }
+Index: lib/evt.c
+===================================================================
+--- lib/evt.c (revision 1410)
++++ lib/evt.c (revision 1413)
+@@ -245,6 +245,9 @@
+ saHandleDestroy(&channel_handle_db, handle);
+ saHandleInstancePut(&channel_handle_db, handle);
+ }
++
++ pthread_mutex_destroy(&evti->ei_dispatch_mutex);
++ pthread_mutex_destroy(&evti->ei_response_mutex);
+ }
+
+ /*
+@@ -272,6 +275,7 @@
+ saEvtEventFree(handle);
+ }
+
++ pthread_mutex_destroy(&eci->eci_mutex);
+ }
+
+ /*
+@@ -296,6 +300,8 @@
+ if (edi->edi_event_data) {
+ free(edi->edi_event_data);
+ }
++
++ pthread_mutex_destroy(&edi->edi_mutex);
+ }
+
+ static SaAisErrorT evt_recv_event(int fd, struct lib_event_data **msg)
+Index: lib/cfg.c
+===================================================================
+--- lib/cfg.c (revision 1410)
++++ lib/cfg.c (revision 1413)
+@@ -88,6 +88,10 @@
+ */
+ void cfg_handleInstanceDestructor (void *instance)
+ {
++ struct cfg_instance *cfg_instance = instance;
++
++ pthread_mutex_destroy (&cfg_instance->response_mutex);
++ pthread_mutex_destroy (&cfg_instance->dispatch_mutex);
+ }
+
+ SaAisErrorT
+Index: lib/ckpt.c
+===================================================================
+--- lib/ckpt.c (revision 1410)
++++ lib/ckpt.c (revision 1413)
+@@ -155,15 +155,24 @@
+ */
+ void ckptHandleInstanceDestructor (void *instance)
+ {
++ struct ckptInstance *ckptInstance = instance;
++
++ pthread_mutex_destroy (&ckptInstance->response_mutex);
++ pthread_mutex_destroy (&ckptInstance->dispatch_mutex);
+ }
+
+ void checkpointHandleInstanceDestructor (void *instance)
+ {
+- return;
++ struct ckptCheckpointInstance *checkpointInstance = instance;
++
++ pthread_mutex_destroy (&checkpointInstance->response_mutex);
+ }
+
+ void ckptSectionIterationHandleInstanceDestructor (void *instance)
+ {
++ struct ckptSectionIterationInstance *iterationInstance = instance;
++
++ pthread_mutex_destroy (&iterationInstance->response_mutex);
+ }
+
+ static void ckptSectionIterationInstanceFinalize (struct ckptSectionIterationInstance *ckptSectionIterationInstance)
+Index: lib/amf.c
+===================================================================
+--- lib/amf.c (revision 1410)
++++ lib/amf.c (revision 1413)
+@@ -101,6 +101,10 @@
+
+ void amfHandleInstanceDestructor (void *instance)
+ {
++ struct amfInstance *amfInstance = instance;
++
++ pthread_mutex_destroy (&amfInstance->response_mutex);
++ pthread_mutex_destroy (&amfInstance->dispatch_mutex);
+ }
+
+ SaAisErrorT
+Index: lib/lck.c
+===================================================================
+--- lib/lck.c (revision 1410)
++++ lib/lck.c (revision 1413)
+@@ -144,11 +144,14 @@
+ */
+ void lckHandleInstanceDestructor (void *instance)
+ {
++ struct lckInstance *lckInstance = instance;
++
++ pthread_mutex_destroy (&lckInstance->response_mutex);
++ pthread_mutex_destroy (&lckInstance->dispatch_mutex);
+ }
+
+ void lckResourceHandleInstanceDestructor (void *instance)
+ {
+- return;
+ }
+
+ void lckResourceHandleLockIdInstanceDestructor (void *instance)
+Index: lib/cpg.c
+===================================================================
+--- lib/cpg.c (revision 1410)
++++ lib/cpg.c (revision 1413)
+@@ -76,6 +76,10 @@
+ */
+ static void cpg_instance_destructor (void *instance)
+ {
++ struct cpg_inst *cpg_inst = instance;
++
++ pthread_mutex_destroy (&cpg_inst->response_mutex);
++ pthread_mutex_destroy (&cpg_inst->dispatch_mutex);
+ }
+
+
+Index: lib/clm.c
+===================================================================
+--- lib/clm.c (revision 1410)
++++ lib/clm.c (revision 1413)
+@@ -92,6 +92,10 @@
+
+ void clmHandleInstanceDestructor (void *instance)
+ {
++ struct clmInstance *clmInstance = instance;
++
++ pthread_mutex_destroy (&clmInstance->response_mutex);
++ pthread_mutex_destroy (&clmInstance->dispatch_mutex);
+ }
+
+
+Index: lib/msg.c
+===================================================================
+--- lib/msg.c (revision 1410)
++++ lib/msg.c (revision 1413)
+@@ -131,11 +131,14 @@
+ */
+ void msgHandleInstanceDestructor (void *instance)
+ {
++ struct msgInstance *msgInstance = instance;
++
++ pthread_mutex_destroy (&msgInstance->response_mutex);
++ pthread_mutex_destroy (&msgInstance->dispatch_mutex);
+ }
+
+ void queueHandleInstanceDestructor (void *instance)
+ {
+- return;
+ }
+
+ #ifdef COMPILE_OUT
+Index: lib/evs.c
+===================================================================
+--- lib/evs.c (revision 1410)
++++ lib/evs.c (revision 1413)
+@@ -80,6 +80,10 @@
+ */
+ static void evs_instance_destructor (void *instance)
+ {
++ struct evs_inst *evs_inst = instance;
++
++ pthread_mutex_destroy (&evs_inst->response_mutex);
++ pthread_mutex_destroy (&evs_inst->dispatch_mutex);
+ }
+
+
|
[-]
[+]
|
Added |
revision-1414.patch
^
|
@@ -0,0 +1,12 @@
+Index: exec/evt.c
+===================================================================
+--- exec/evt.c (revision 1413)
++++ exec/evt.c (revision 1414)
+@@ -1987,6 +1987,7 @@
+ if (!ep) {
+ log_printf(LOG_LEVEL_WARNING,
+ "5Memory allocation error, can't deliver event\n");
++ free (ed);
+ return;
+ }
+ ep->cel_chan_handle = eco->eco_lib_handle;
|
[-]
[+]
|
Added |
revision-1415.patch
^
|
@@ -0,0 +1,23 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1414)
++++ exec/totemsrp.c (revision 1415)
+@@ -2272,13 +2272,13 @@
+ * Delete item from pending queue
+ */
+ queue_item_remove (mcast_queue);
++
++ /*
++ * If messages mcasted, deliver any new messages to totempg
++ */
++ instance->my_high_seq_received = token->seq;
+ }
+
+- /*
+- * If messages mcasted, deliver any new messages to totempg
+- */
+- instance->my_high_seq_received = token->seq;
+-
+ update_aru (instance);
+
+ /*
|
[-]
[+]
|
Added |
revision-1416.patch
^
|
@@ -0,0 +1,82 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1415)
++++ exec/totemsrp.c (revision 1416)
+@@ -3385,9 +3385,10 @@
+ struct sort_queue_item *sort_queue_item_p;
+ unsigned int i;
+ int res;
+- struct mcast *mcast;
++ struct mcast *mcast_in;
++ struct mcast mcast_header;
+ unsigned int range = 0;
+- int endian_conversion_required = 0 ;
++ int endian_conversion_required;
+ unsigned int my_high_delivered_stored = 0;
+
+
+@@ -3435,19 +3436,28 @@
+
+ sort_queue_item_p = ptr;
+
+- mcast = sort_queue_item_p->iovec[0].iov_base;
+- assert (mcast != (struct mcast *)0xdeadbeef);
++ mcast_in = sort_queue_item_p->iovec[0].iov_base;
++ assert (mcast_in != (struct mcast *)0xdeadbeef);
+
++ endian_conversion_required = 0;
++ if (mcast_in->header.endian_detector != ENDIAN_LOCAL) {
++ endian_conversion_required = 1;
++ mcast_endian_convert (mcast_in, &mcast_header);
++ } else {
++ memcpy (&mcast_header, mcast_in, sizeof (struct mcast));
++ }
++
+ /*
+ * Skip messages not originated in instance->my_deliver_memb
+ */
+ if (skip &&
+- memb_set_subset (&mcast->system_from,
++ memb_set_subset (&mcast_header.system_from,
+ 1,
+ instance->my_deliver_memb_list,
+ instance->my_deliver_memb_entries) == 0) {
+- instance->my_high_delivered = my_high_delivered_stored + i;
+
++ instance->my_high_delivered = my_high_delivered_stored + i;
++
+ continue;
+ }
+
+@@ -3456,20 +3466,15 @@
+ */
+ log_printf (instance->totemsrp_log_level_debug,
+ "Delivering MCAST message with seq %x to pending delivery queue\n",
+- mcast->seq);
++ mcast_header.seq);
+
+- if (mcast->header.endian_detector != ENDIAN_LOCAL) {
+- endian_conversion_required = 1;
+- mcast_endian_convert (mcast, mcast);
+- }
+-
+ /*
+ * Message is locally originated multicast
+ */
+ if (sort_queue_item_p->iov_len > 1 &&
+ sort_queue_item_p->iovec[0].iov_len == sizeof (struct mcast)) {
+ instance->totemsrp_deliver_fn (
+- mcast->header.nodeid,
++ mcast_header.header.nodeid,
+ &sort_queue_item_p->iovec[1],
+ sort_queue_item_p->iov_len - 1,
+ endian_conversion_required);
+@@ -3478,7 +3483,7 @@
+ sort_queue_item_p->iovec[0].iov_base += sizeof (struct mcast);
+
+ instance->totemsrp_deliver_fn (
+- mcast->header.nodeid,
++ mcast_header.header.nodeid,
+ sort_queue_item_p->iovec,
+ sort_queue_item_p->iov_len,
+ endian_conversion_required);
|
[-]
[+]
|
Added |
revision-1419.patch
^
|
@@ -0,0 +1,10 @@
+Index: Makefile
+===================================================================
+--- Makefile (revision 1416)
++++ Makefile (revision 1419)
+@@ -196,4 +196,4 @@
+ install -m 644 man/*.8 $(DESTDIR)$(MANDIR)/man8
+
+ doxygen:
+- doxygen
++ mkdir -p doc/api && doxygen
|
[-]
[+]
|
Added |
revision-1423.patch
^
|
@@ -0,0 +1,47 @@
+Index: exec/ckpt.c
+===================================================================
+--- exec/ckpt.c (revision 1422)
++++ exec/ckpt.c (revision 1423)
+@@ -825,14 +825,7 @@
+ }
+
+ my_lowest_nodeid = 0xffffffff;
+- for (i = 0; i < my_member_list_entries; i++) {
+- if ((my_member_list[i] != 0) &&
+- (my_member_list[i] < my_lowest_nodeid)) {
+
+- my_lowest_nodeid = my_member_list[i];
+- }
+- }
+-
+ /*
+ * Handle regular configuration
+ */
+@@ -842,6 +835,13 @@
+ my_member_list_entries = member_list_entries;
+ memcpy (&my_saved_ring_id, ring_id,
+ sizeof (struct memb_ring_id));
++ for (i = 0; i < my_member_list_entries; i++) {
++ if ((my_member_list[i] != 0) &&
++ (my_member_list[i] < my_lowest_nodeid)) {
++
++ my_lowest_nodeid = my_member_list[i];
++ }
++ }
+ }
+ }
+
+Index: exec/sync.c
+===================================================================
+--- exec/sync.c (revision 1422)
++++ exec/sync.c (revision 1423)
+@@ -452,6 +452,9 @@
+ {
+ sync_ring_id = ring_id;
+
++ if (configuration_type != TOTEM_CONFIGURATION_REGULAR) {
++ return;
++ }
+ if (sync_processing && sync_callbacks.sync_abort != NULL) {
+ sync_callbacks.sync_abort ();
+ }
|
[-]
[+]
|
Added |
revision-1426.patch
^
|
@@ -0,0 +1,173 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1423)
++++ exec/totemsrp.c (revision 1426)
+@@ -138,6 +138,11 @@
+ MESSAGE_TYPE_TOKEN_HOLD_CANCEL = 5, /* cancel the holding of the token */
+ };
+
++enum encapsulation_type {
++ MESSAGE_ENCAPSULATED = 1,
++ MESSAGE_NOT_ENCAPSULATED = 2
++};
++
+ /*
+ * New membership algorithm local variables
+ */
+@@ -673,7 +678,10 @@
+ {
+ struct totemsrp_instance *instance;
+ unsigned int res;
++struct orf_token suck;
+
++printf ("%p %p size is %d %d\n", &suck, &suck.rtr_list[0], sizeof (struct orf_token), (sizeof (struct rtr_item) * RETRANSMIT_ENTRIES_MAX));
++exit (1);
+ res = hdb_handle_create (&totemsrp_instance_database,
+ sizeof (struct totemsrp_instance), handle);
+ if (res != 0) {
+@@ -1891,8 +1899,9 @@
+ sizeof (struct mcast));
+ memcpy (&message_item.mcast->ring_id, &instance->my_ring_id,
+ sizeof (struct memb_ring_id));
+- message_item.mcast->header.encapsulated = 1;
++ message_item.mcast->header.encapsulated = MESSAGE_ENCAPSULATED;
+ message_item.mcast->header.nodeid = instance->my_id.addr[0].nodeid;
++ message_item.mcast->header.endian_detector = ENDIAN_LOCAL;
+ assert (message_item.mcast->header.nodeid);
+ message_item.iov_len = sort_queue_item->iov_len;
+ memcpy (&message_item.iovec, &sort_queue_item->iovec,
+@@ -1987,7 +1996,7 @@
+ */
+ message_item.mcast->header.type = MESSAGE_TYPE_MCAST;
+ message_item.mcast->header.endian_detector = ENDIAN_LOCAL;
+- message_item.mcast->header.encapsulated = 2;
++ message_item.mcast->header.encapsulated = MESSAGE_NOT_ENCAPSULATED;
+ message_item.mcast->header.nodeid = instance->my_id.addr[0].nodeid;
+ assert (message_item.mcast->header.nodeid);
+
+@@ -2558,14 +2567,14 @@
+ orf_token.token_seq = SEQNO_START_TOKEN;
+ orf_token.retrans_flg = 1;
+ instance->my_set_retrans_flg = 1;
+-/*
++
+ if (queue_is_empty (&instance->retrans_message_queue) == 1) {
+ orf_token.retrans_flg = 0;
++ instance->my_set_retrans_flg = 0;
+ } else {
+ orf_token.retrans_flg = 1;
+ instance->my_set_retrans_flg = 1;
+ }
+-*/
+
+ orf_token.aru = 0;
+ orf_token.aru = SEQNO_START_MSG - 1;
+@@ -2601,6 +2610,9 @@
+ * TODO high delivered is really instance->my_aru, but with safe this
+ * could change?
+ */
++ instance->my_received_flg =
++ (instance->my_aru == instance->my_high_seq_received);
++
+ memb_list[commit_token->memb_index].high_delivered = instance->my_high_delivered;
+ memb_list[commit_token->memb_index].received_flg = instance->my_received_flg;
+
+@@ -3084,7 +3096,6 @@
+ unsigned int mcasted_retransmit;
+ unsigned int mcasted_regular;
+ unsigned int last_aru;
+- unsigned int low_water;
+
+ #ifdef GIVEINFO
+ struct timeval tv_current;
+@@ -3278,13 +3289,7 @@
+ * has recovered all messages it can recover
+ * (ie: its retrans queue is empty)
+ */
+- low_water = instance->my_aru;
+- if (sq_lt_compare (last_aru, low_water)) {
+- low_water = last_aru;
+- }
+-// TODO is this code right
+- if (queue_is_empty (&instance->retrans_message_queue) == 0 ||
+- low_water != instance->my_high_seq_received) {
++ if (queue_is_empty (&instance->retrans_message_queue) == 0) {
+
+ if (token->retrans_flg == 0) {
+ token->retrans_flg = 1;
+@@ -3295,10 +3300,10 @@
+ token->retrans_flg = 0;
+ }
+ log_printf (instance->totemsrp_log_level_debug,
+- "token retrans flag is %d my set retrans flag%d retrans queue empty %d count %d, low_water %x aru %x\n",
++ "token retrans flag is %d my set retrans flag%d retrans queue empty %d count %d, aru %x\n",
+ token->retrans_flg, instance->my_set_retrans_flg,
+ queue_is_empty (&instance->retrans_message_queue),
+- instance->my_retrans_flg_count, low_water, token->aru);
++ instance->my_retrans_flg_count, token->aru);
+ if (token->retrans_flg == 0) {
+ instance->my_retrans_flg_count += 1;
+ } else {
+@@ -3310,13 +3315,16 @@
+ log_printf (instance->totemsrp_log_level_debug,
+ "install seq %x aru %x high seq received %x\n",
+ instance->my_install_seq, instance->my_aru, instance->my_high_seq_received);
+- if (instance->my_retrans_flg_count >= 2 && instance->my_aru >= instance->my_install_seq && instance->my_received_flg == 0) {
++ if (instance->my_retrans_flg_count >= 2 &&
++ instance->my_received_flg == 0 &&
++ sq_lte_compare (instance->my_install_seq, instance->my_aru)) {
+ instance->my_received_flg = 1;
+ instance->my_deliver_memb_entries = instance->my_trans_memb_entries;
+ memcpy (instance->my_deliver_memb_list, instance->my_trans_memb_list,
+ sizeof (struct totem_ip_address) * instance->my_trans_memb_entries);
+ }
+- if (instance->my_retrans_flg_count >= 3 && token->aru >= instance->my_install_seq) {
++ if (instance->my_retrans_flg_count >= 3 &&
++ sq_lte_compare (instance->my_install_seq, token->aru)) {
+ instance->my_rotation_counter += 1;
+ } else {
+ instance->my_rotation_counter = 0;
+@@ -3515,18 +3523,12 @@
+ memcpy (&mcast_header, msg, sizeof (struct mcast));
+ }
+
+-/*
+- if (mcast_header.header.encapsulated == 1) {
++ if (mcast_header.header.encapsulated == MESSAGE_ENCAPSULATED) {
+ sort_queue = &instance->recovery_sort_queue;
+ } else {
+ sort_queue = &instance->regular_sort_queue;
+ }
+-*/
+- if (instance->memb_state == MEMB_STATE_RECOVERY) {
+- sort_queue = &instance->recovery_sort_queue;
+- } else {
+- sort_queue = &instance->regular_sort_queue;
+- }
++
+ assert (msg_len < FRAME_SIZE_MAX);
+
+ #ifdef TEST_DROP_MCAST_PERCENTAGE
+@@ -3853,6 +3855,8 @@
+ out->header.type = in->header.type;
+ out->header.endian_detector = ENDIAN_LOCAL;
+ out->header.nodeid = swab32 (in->header.nodeid);
++ out->header.encapsulated = in->header.encapsulated;
++
+ out->seq = swab32 (in->seq);
+ out->this_seqno = swab32 (in->this_seqno);
+ totemip_copy_endian_convert(&out->ring_id.rep, &in->ring_id.rep);
+@@ -4051,7 +4055,12 @@
+ log_printf (instance->totemsrp_log_level_security, "Received message is too short... ignoring %d.\n", msg_len);
+ return;
+ }
+-
++
++ if ((int)message_header->type >= totemsrp_message_handlers.count) {
++ log_printf (instance->totemsrp_log_level_security, "Type of received message is wrong... ignoring %d.\n", (int)message_header->type);
++ return;
++ }
++
+ /*
+ * Handle incoming message
+ */
|
[-]
[+]
|
Added |
revision-1446.patch
^
|
@@ -0,0 +1,15 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1426)
++++ exec/totemsrp.c (revision 1446)
+@@ -678,10 +678,7 @@
+ {
+ struct totemsrp_instance *instance;
+ unsigned int res;
+-struct orf_token suck;
+
+-printf ("%p %p size is %d %d\n", &suck, &suck.rtr_list[0], sizeof (struct orf_token), (sizeof (struct rtr_item) * RETRANSMIT_ENTRIES_MAX));
+-exit (1);
+ res = hdb_handle_create (&totemsrp_instance_database,
+ sizeof (struct totemsrp_instance), handle);
+ if (res != 0) {
|
[-]
[+]
|
Added |
revision-1449.patch
^
|
@@ -0,0 +1,90 @@
+Index: exec/service.c
+===================================================================
+--- exec/service.c (revision 1446)
++++ exec/service.c (revision 1449)
+@@ -87,7 +87,7 @@
+ }
+ };
+
+-struct openais_service_handler *ais_service[128];
++struct openais_service_handler *ais_service[SERVICE_HANDLER_MAXIMUM_COUNT];
+
+ /*
+ * Adds a service handler to the object database
+Index: exec/service.h
+===================================================================
+--- exec/service.h (revision 1446)
++++ exec/service.h (revision 1449)
+@@ -44,6 +44,7 @@
+ #endif
+
+ #define SERVICE_ID_MAKE(a,b) ( ((a)<<16) | (b) )
++#define SERVICE_HANDLER_MAXIMUM_COUNT 64
+
+ enum openais_flow_control {
+ OPENAIS_FLOW_CONTROL_REQUIRED = 1,
+Index: exec/sync.c
+===================================================================
+--- exec/sync.c (revision 1446)
++++ exec/sync.c (revision 1449)
+@@ -198,9 +198,10 @@
+ {
+ int res;
+
+-// TODO rewrite this to get rid of the for (;;)
+ for (;;) {
+- res = sync_callbacks_retrieve (sync_recovery_index, &sync_callbacks);
++ res = sync_callbacks_retrieve (sync_recovery_index,
++ &sync_callbacks);
++
+ /*
+ * No more service handlers have sync callbacks at this time
+ ` */
+@@ -418,7 +419,6 @@
+ log_printf (LOG_LEVEL_DEBUG,
+ "Committing synchronization for (%s)\n",
+ sync_callbacks.name);
+-
+ }
+
+ /*
+Index: exec/main.c
+===================================================================
+--- exec/main.c (revision 1446)
++++ exec/main.c (revision 1449)
+@@ -175,15 +175,29 @@
+ static int openais_sync_callbacks_retrieve (int sync_id,
+ struct sync_callbacks *callbacks)
+ {
+- if (ais_service[sync_id] == NULL) {
++ unsigned int ais_service_index;
++ unsigned int ais_services_found = 0;
++
++ for (ais_service_index = 0;
++ ais_service_index < SERVICE_HANDLER_MAXIMUM_COUNT;
++ ais_service_index++) {
++
++ if (ais_service[ais_service_index] != NULL) {
++ if (ais_services_found == sync_id) {
++ break;
++ }
++ ais_services_found += 1;
++ }
++ }
++ if (ais_service_index == SERVICE_HANDLER_MAXIMUM_COUNT) {
+ memset (callbacks, 0, sizeof (struct sync_callbacks));
+ return (-1);
+ }
+- callbacks->name = ais_service[sync_id]->name;
+- callbacks->sync_init = ais_service[sync_id]->sync_init;
+- callbacks->sync_process = ais_service[sync_id]->sync_process;
+- callbacks->sync_activate = ais_service[sync_id]->sync_activate;
+- callbacks->sync_abort = ais_service[sync_id]->sync_abort;
++ callbacks->name = ais_service[ais_service_index]->name;
++ callbacks->sync_init = ais_service[ais_service_index]->sync_init;
++ callbacks->sync_process = ais_service[ais_service_index]->sync_process;
++ callbacks->sync_activate = ais_service[ais_service_index]->sync_activate;
++ callbacks->sync_abort = ais_service[ais_service_index]->sync_abort;
+ return (0);
+ }
+
|
[-]
[+]
|
Added |
revision-1450.patch
^
|
@@ -0,0 +1,174 @@
+Index: lcr/test.c
+===================================================================
+--- lcr/test.c (revision 1449)
++++ lcr/test.c (revision 1450)
+@@ -87,7 +87,7 @@
+ (void *)0xaaaa1111);
+ assert (res == 0);
+
+- a_iface_ver1 = (struct iface *)a_iface_ver0_p;
++ a_iface_ver1 = (struct iface *)a_iface_ver1_p;
+
+ res = lcr_ifact_reference (
+ &b_ifact_handle_ver1,
+@@ -97,7 +97,7 @@
+ (void *)0xbbbb1111);
+ assert (res == 0);
+
+- b_iface_ver1 = (struct iface *)b_iface_ver0_p;
++ b_iface_ver1 = (struct iface *)b_iface_ver1_p;
+
+ a_iface_ver0->func1();
+ a_iface_ver0->func2();
+Index: lcr/lcr_ifact.c
+===================================================================
+--- lcr/lcr_ifact.c (revision 1449)
++++ lcr/lcr_ifact.c (revision 1450)
+@@ -45,6 +45,7 @@
+ struct lcr_component_instance {
+ struct lcr_iface *ifaces;
+ int iface_count;
++ unsigned int comp_handle;
+ void *dl_handle;
+ int refcount;
+ char library_name[256];
+@@ -68,7 +69,7 @@
+ .iterator = 0
+ };
+
+-static unsigned int g_component_handle;
++static unsigned int g_component_handle = 0xFFFFFFFF;
+
+ #ifdef OPENAIS_LINUX
+ static int lcr_select_so (const struct dirent *dirent)
+@@ -170,7 +171,6 @@
+
+ res = getcwd (cwd, sizeof (cwd));
+ if (res != NULL) {
+- strcat (cwd, "/");
+ path_list[0] = strdup (cwd);
+ path_list_entries++;
+ }
+@@ -291,6 +291,8 @@
+ }
+ dl_handle = dlopen (dl_name, RTLD_LAZY);
+ if (dl_handle == NULL) {
++ fprintf (stderr, "LCR error loading plugin: %s\n",
++ dlerror());
+ continue;
+ }
+ instance = lcr_comp_find (iface_name, version, iface_number);
+@@ -301,8 +303,8 @@
+ }
+
+ /*
+- * No matching interfaces found, try next shared object
+- */
++ * No matching interfaces found, try next shared object
++ */
+ if (g_component_handle != 0xFFFFFFFF) {
+ hdb_handle_destroy (&lcr_component_instance_database,
+ g_component_handle);
+@@ -349,20 +351,20 @@
+
+ // TODO error checking in this code is weak
+ /*
+- * Find all *.lcrso files in search paths
++ * Search through all lcrso files for desired interface
+ */
+ for (i = 0; i < path_list_entries; i++) {
+- res = interface_find_and_load (
+- path_list[i],
+- iface_name,
+- version,
+- &instance,
+- &iface_number);
++ res = interface_find_and_load (
++ path_list[i],
++ iface_name,
++ version,
++ &instance,
++ &iface_number);
+
+- if (res == 0) {
+- goto found;
++ if (res == 0) {
++ goto found;
++ }
+ }
+- }
+
+ /*
+ * No matching interfaces found in all shared objects
+@@ -379,9 +381,10 @@
+ iface_handle);
+ hdb_handle_get (&lcr_iface_instance_database,
+ *iface_handle, (void *)&iface_instance);
+- iface_instance->component_handle = g_component_handle;
++ iface_instance->component_handle = instance->comp_handle;
+ iface_instance->context = context;
+ iface_instance->destructor = instance->ifaces[iface_number].destructor;
++ hdb_handle_put (&lcr_iface_instance_database, *iface_handle);
+ return (0);
+ }
+
+@@ -408,17 +411,21 @@
+ void lcr_component_register (struct lcr_comp *comp)
+ {
+ struct lcr_component_instance *instance;
++ static unsigned int comp_handle;
+
+ hdb_handle_create (&lcr_component_instance_database,
+ sizeof (struct lcr_component_instance),
+- &g_component_handle);
++ &comp_handle);
+ hdb_handle_get (&lcr_component_instance_database,
+- g_component_handle, (void *)&instance);
++ comp_handle, (void *)&instance);
+
+ instance->ifaces = comp->ifaces;
+ instance->iface_count = comp->iface_count;
++ instance->comp_handle = comp_handle;
+ instance->dl_handle = NULL;
+
+ hdb_handle_put (&lcr_component_instance_database,
+- g_component_handle);
++ comp_handle);
++
++ g_component_handle = comp_handle;
+ }
+Index: lcr/Makefile
+===================================================================
+--- lcr/Makefile (revision 1449)
++++ lcr/Makefile (revision 1450)
+@@ -27,7 +27,7 @@
+ include ../Makefile.inc
+
+ CFLAGS += -I../include
+-LDFLAGS += -L./ ${DYFLAGS}
++override LDFLAGS += ${DYFLAGS}
+
+ ifeq (${OPENAIS_COMPAT}, LINUX)
+ LDFLAGS += -ldl
+@@ -57,7 +57,7 @@
+ endif
+
+ test: test.o uis.o lcr_ifact.o
+- $(CC) $(LDFLAGS) test.o lcr_ifact.o uis.o -lpthread -o test
++ $(CC) $(LDFLAGS) -fPIC test.o lcr_ifact.o uis.o -lpthread -o test
+
+ test_static: test.o libtest_a.o libtest_b.o uis.o lcr_ifact.o
+ $(CC) $(LDFLAGS) test.o libtest_a.o libtest_b.o lcr_ifact.o -o test_static
+@@ -71,6 +71,12 @@
+ libtest_b.o: libtest_b.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $(*F).c
+
++lcr_ifact.o: lcr_ifact.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $(*F).c
++
++test.o: test.c
++ $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -c -o $@ $(*F).c
++
+ clean:
+ rm -f test libtest.so* *.o uic liblcr.so* liblcr.a *.lcrso *.da *.ba *.bb *.bbg \
+ test_static
|
[-]
[+]
|
Added |
revision-1453.patch
^
|
@@ -0,0 +1,22 @@
+Index: exec/amfcomp.c
+===================================================================
+--- exec/amfcomp.c (revision 1450)
++++ exec/amfcomp.c (revision 1453)
+@@ -1129,11 +1129,14 @@
+
+ if (comp->saAmfCompPresenceState == SA_AMF_PRESENCE_RESTARTING) {
+ comp_presence_state_set (comp, SA_AMF_PRESENCE_INSTANTIATED);
+- } else if (comp->saAmfCompPresenceState == SA_AMF_PRESENCE_INSTANTIATING) {
++ } else
++ if (comp->saAmfCompPresenceState == SA_AMF_PRESENCE_INSTANTIATING) {
+ amf_comp_operational_state_set (comp, SA_AMF_OPERATIONAL_ENABLED);
+ comp_presence_state_set (comp, SA_AMF_PRESENCE_INSTANTIATED);
+- }
+- else {
++ } else
++ if (comp->saAmfCompPresenceState == SA_AMF_PRESENCE_UNINSTANTIATED) {
++ return SA_AIS_ERR_INVALID_PARAM;
++ } else {
+ assert (0);
+ }
+
|
[-]
[+]
|
Added |
revision-1455.patch
^
|
@@ -0,0 +1,32 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1453)
++++ exec/totemsrp.c (revision 1455)
+@@ -1779,15 +1779,10 @@
+ /*
+ * Build regular configuration
+ */
+- instance->my_new_memb_entries = commit_token->addr_entries;
+-
+ totemrrp_processor_count_set (
+ instance->totemrrp_handle,
+ commit_token->addr_entries);
+
+- memcpy (instance->my_new_memb_list, addr,
+- sizeof (struct srp_addr) * instance->my_new_memb_entries);
+-
+ /*
+ * Build transitional configuration
+ */
+@@ -2598,6 +2593,11 @@
+ addr = (struct srp_addr *)commit_token->end_of_commit_token;
+ memb_list = (struct memb_commit_token_memb_entry *)(addr + commit_token->addr_entries);
+
++ memcpy (instance->my_new_memb_list, addr,
++ sizeof (struct srp_addr) * commit_token->addr_entries);
++
++ instance->my_new_memb_entries = commit_token->addr_entries;
++
+ memcpy (&memb_list[commit_token->memb_index].ring_id,
+ &instance->my_old_ring_id, sizeof (struct memb_ring_id));
+ assert (!totemip_zero_check(&instance->my_old_ring_id.rep));
|
[-]
[+]
|
Added |
revision-1464.patch
^
|
@@ -0,0 +1,22 @@
+Index: exec/timer.c
+===================================================================
+--- exec/timer.c (revision 1455)
++++ exec/timer.c (revision 1464)
+@@ -177,7 +177,7 @@
+ int res;
+ int unlock;
+
+- if (pthread_equal (pthread_self(), expiry_thread) == 0) {
++ if (pthread_equal (pthread_self(), expiry_thread) != 0) {
+ unlock = 0;
+ } else {
+ unlock = 1;
+@@ -209,7 +209,7 @@
+ int res;
+ int unlock;
+
+- if (pthread_equal (pthread_self(), expiry_thread) == 0) {
++ if (pthread_equal (pthread_self(), expiry_thread) != 0) {
+ unlock = 0;
+ } else {
+ unlock = 1;
|
[-]
[+]
|
Added |
revision-1465.patch
^
|
@@ -0,0 +1,20 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1464)
++++ exec/totemsrp.c (revision 1465)
+@@ -2838,7 +2838,6 @@
+ }
+ res = write (fd, &memb_ring_id->seq, sizeof (unsigned long long));
+ assert (res == sizeof (unsigned long long));
+- fsync (fd);
+ close (fd);
+ } else {
+ log_printf (instance->totemsrp_log_level_warning,
+@@ -2879,7 +2878,6 @@
+ //assert (fd > 0);
+ res = write (fd, &instance->my_ring_id.seq, sizeof (unsigned long long));
+ assert (res == sizeof (unsigned long long));
+- fsync (fd);
+ close (fd);
+ }
+
|
[-]
[+]
|
Added |
revision-1469.patch
^
|
@@ -0,0 +1,26 @@
+Index: include/saCkpt.h
+===================================================================
+--- include/saCkpt.h (revision 1465)
++++ include/saCkpt.h (revision 1469)
+@@ -199,7 +199,7 @@
+ SaCkptCheckpointHandleT checkpointHandle,
+ SaCkptSectionCreationAttributesT *sectionCreationAttributes,
+ const void *initialData,
+- SaUint32T initialDataSize);
++ SaSizeT initialDataSize);
+
+
+ SaAisErrorT
+Index: lib/ckpt.c
+===================================================================
+--- lib/ckpt.c (revision 1465)
++++ lib/ckpt.c (revision 1469)
+@@ -1036,7 +1036,7 @@
+ SaCkptCheckpointHandleT checkpointHandle,
+ SaCkptSectionCreationAttributesT *sectionCreationAttributes,
+ const void *initialData,
+- SaUint32T initialDataSize)
++ SaSizeT initialDataSize)
+ {
+ SaAisErrorT error;
+ struct ckptCheckpointInstance *ckptCheckpointInstance;
|
[-]
[+]
|
Added |
revision-1471.patch
^
|
@@ -0,0 +1,21 @@
+Index: exec/cpg.c
+===================================================================
+--- exec/cpg.c (revision 1469)
++++ exec/cpg.c (revision 1471)
+@@ -688,10 +688,16 @@
+ static void exec_cpg_downlist_endian_convert (void *msg)
+ {
+ struct req_exec_cpg_downlist *req_exec_cpg_downlist = (struct req_exec_cpg_downlist *)msg;
++ unsigned int i;
+
+ req_exec_cpg_downlist->left_nodes = swab32(req_exec_cpg_downlist->left_nodes);
++
++ for (i = 0; i < req_exec_cpg_downlist->left_nodes; i++) {
++ req_exec_cpg_downlist->nodeids[i] = swab32(req_exec_cpg_downlist->nodeids[i]);
++ }
+ }
+
++
+ static void exec_cpg_mcast_endian_convert (void *msg)
+ {
+ struct req_exec_cpg_mcast *req_exec_cpg_mcast = (struct req_exec_cpg_mcast *)msg;
|
[-]
[+]
|
Added |
revision-1473.patch
^
|
@@ -0,0 +1,13 @@
+Index: exec/timer.c
+===================================================================
+--- exec/timer.c (revision 1471)
++++ exec/timer.c (revision 1473)
+@@ -241,7 +241,7 @@
+ return;
+ }
+
+- if (pthread_equal (pthread_self(), expiry_thread) == 0) {
++ if (pthread_equal (pthread_self(), expiry_thread) != 0) {
+ unlock = 0;
+ } else {
+ unlock = 1;
|
[-]
[+]
|
Added |
revision-1477.patch
^
|
@@ -0,0 +1,41 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1473)
++++ exec/totemsrp.c (revision 1477)
+@@ -495,6 +495,8 @@
+ unsigned int my_pbl;
+
+ unsigned int my_cbl;
++
++ unsigned int operational_entered_once;
+ };
+
+ struct message_handlers {
+@@ -1643,6 +1645,8 @@
+
+ instance->my_received_flg = 0;
+
++ instance->operational_entered_once = 1;
++
+ return;
+ }
+
+@@ -2728,7 +2732,17 @@
+
+ totemip_copy(&commit_token->ring_id.rep, &instance->my_id.addr[0]);
+
+- commit_token->ring_id.seq = instance->token_ring_id_seq + 4;
++ /*
++ * The first time operational is entered, don't increment the ring
++ * sequence number (just reload it from stable storage). This prevents
++ * an error condition where if the executive is stopped and started
++ * before a new ring is formed, the protocol will get stuck in recovery.
++ */
++ if (instance->operational_entered_once) {
++ commit_token->ring_id.seq = instance->token_ring_id_seq + 4;
++ } else {
++ commit_token->ring_id.seq = instance->token_ring_id_seq;
++ }
+
+ /*
+ * This qsort is necessary to ensure the commit token traverses
|
[-]
[+]
|
Added |
revision-1478.patch
^
|
@@ -0,0 +1,24 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1477)
++++ exec/totemsrp.c (revision 1478)
+@@ -1891,14 +1891,14 @@
+ // TODO LEAK
+ message_item.mcast = malloc (sizeof (struct mcast));
+ assert (message_item.mcast);
+- memcpy (message_item.mcast, sort_queue_item->iovec[0].iov_base,
+- sizeof (struct mcast));
+- memcpy (&message_item.mcast->ring_id, &instance->my_ring_id,
+- sizeof (struct memb_ring_id));
++ message_item.mcast->header.type = MESSAGE_TYPE_MCAST;
++ srp_addr_copy (&message_item.mcast->system_from, &instance->my_id);
+ message_item.mcast->header.encapsulated = MESSAGE_ENCAPSULATED;
+ message_item.mcast->header.nodeid = instance->my_id.addr[0].nodeid;
++ assert (message_item.mcast->header.nodeid);
+ message_item.mcast->header.endian_detector = ENDIAN_LOCAL;
+- assert (message_item.mcast->header.nodeid);
++ memcpy (&message_item.mcast->ring_id, &instance->my_ring_id,
++ sizeof (struct memb_ring_id));
+ message_item.iov_len = sort_queue_item->iov_len;
+ memcpy (&message_item.iovec, &sort_queue_item->iovec,
+ sizeof (struct iovec) * sort_queue_item->iov_len);
|
[-]
[+]
|
Added |
revision-1479.patch
^
|
@@ -0,0 +1,13 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1478)
++++ exec/totemsrp.c (revision 1479)
+@@ -2790,7 +2790,7 @@
+ iovs = 2;
+ } else {
+ iovs = 3;
+- iovec[2].iov_base = &instance->my_failed_list;
++ iovec[2].iov_base = instance->my_failed_list;
+ iovec[2].iov_len = instance->my_failed_list_entries *
+ sizeof (struct srp_addr);
+ }
|
[-]
[+]
|
Added |
revision-1480.patch
^
|
@@ -0,0 +1,217 @@
+Index: exec/totempg.c
+===================================================================
+--- exec/totempg.c (revision 1479)
++++ exec/totempg.c (revision 1480)
+@@ -91,6 +91,7 @@
+ #include <assert.h>
+ #include <pthread.h>
+ #include <errno.h>
++#include <unistd.h>
+
+ #include "../include/hdb.h"
+ #include "../include/list.h"
+@@ -279,7 +280,7 @@
+ list_add (&assembly->list, &assembly_list_free);
+ }
+
+-static inline void app_confchg_fn (
++static void app_confchg_fn (
+ enum totem_configuration_type configuration_type,
+ unsigned int *member_list, int member_list_entries,
+ unsigned int *left_list, int left_list_entries,
+@@ -312,7 +313,7 @@
+ }
+ }
+
+-static inline void group_endian_convert (
++static void group_endian_convert (
+ struct iovec *iovec)
+ {
+ unsigned short *group_len;
+@@ -323,10 +324,9 @@
+ for (i = 1; i < group_len[0] + 1; i++) {
+ group_len[i] = swab16(group_len[i]);
+ }
+-
+ }
+
+-static inline int group_matches (
++static int group_matches (
+ struct iovec *iovec,
+ unsigned int iov_len,
+ struct totempg_group *groups_b,
+@@ -346,7 +346,8 @@
+ */
+ if ((size_t)iovec->iov_base % 4 != 0) {
+ iovec_aligned.iov_base = alloca(iovec->iov_len);
+- memcpy(iovec_aligned.iov_base, iovec->iov_base, iovec->iov_len); iovec_aligned.iov_len = iovec->iov_len;
++ memcpy(iovec_aligned.iov_base, iovec->iov_base, iovec->iov_len);
++ iovec_aligned.iov_len = iovec->iov_len;
+ iovec = &iovec_aligned;
+ }
+
+@@ -380,7 +381,7 @@
+ }
+
+
+-static inline void app_deliver_fn (
++static void app_deliver_fn (
+ unsigned int nodeid,
+ struct iovec *iovec,
+ unsigned int iov_len,
+@@ -393,17 +394,17 @@
+ unsigned int res;
+ struct iovec aligned_iovec = { NULL, 0 };
+
+- if (endian_conversion_required) {
+- group_endian_convert (iovec);
+- }
+-
+ /*
+ * Align data structure for sparc and ia64
+ */
+ aligned_iovec.iov_base = alloca(iovec->iov_len);
+ aligned_iovec.iov_len = iovec->iov_len;
++ assert (aligned_iovec.iov_base != NULL);
+ memcpy(aligned_iovec.iov_base, iovec->iov_base, iovec->iov_len);
+ iovec = &aligned_iovec;
++ if (endian_conversion_required) {
++ group_endian_convert (&aligned_iovec);
++ }
+
+ for (i = 0; i <= totempg_max_handle; i++) {
+ res = hdb_handle_get (&totempg_groups_instance_database,
+@@ -411,9 +412,9 @@
+
+ if (res == 0) {
+ assert (iov_len == 1);
+- if (group_matches (iovec, iov_len, instance->groups, instance->groups_cnt, &adjust_iovec)) {
+- stripped_iovec.iov_len = iovec->iov_len - adjust_iovec;
+-// stripped_iovec.iov_base = (char *)iovec->iov_base + adjust_iovec;
++ if (group_matches (&aligned_iovec, iov_len, instance->groups, instance->groups_cnt, &adjust_iovec)) {
++ stripped_iovec.iov_len = aligned_iovec.iov_len - adjust_iovec;
++// stripped_iovec.iov_base = (char *)aligned_iovec.iov_base + adjust_iovec;
+
+ /*
+ * Align data structure for sparc and ia64
+@@ -463,11 +464,11 @@
+ int endian_conversion_required)
+ {
+ struct totempg_mcast *mcast;
+- unsigned short *msg_lens;
++ unsigned short *msg_lens_from_msg;
++ unsigned short msg_lens[1500];
++ unsigned short mcast_msg_count;
+ int i;
+ struct assembly *assembly;
+- char header[FRAME_SIZE_MAX];
+- int h_index;
+ int a_i = 0;
+ int msg_count;
+ int continuation;
+@@ -476,8 +477,15 @@
+ assembly = assembly_ref (nodeid);
+ assert (assembly);
+
++ mcast = (struct totempg_mcast *)iovec[0].iov_base;
++ if (endian_conversion_required) {
++ mcast_msg_count = swab16 (mcast->msg_count);
++ } else {
++ mcast_msg_count = mcast->msg_count;
++ }
++ msg_count = mcast_msg_count;
++
+ /*
+- * Assemble the header into one block of data and
+ * assemble the packet contents into one block of data to simplify delivery
+ */
+ if (iov_len == 1) {
+@@ -488,44 +496,36 @@
+ char *data;
+ int datasize;
+
+- mcast = (struct totempg_mcast *)iovec[0].iov_base;
+- if (endian_conversion_required) {
+- mcast->msg_count = swab16 (mcast->msg_count);
++ msg_lens_from_msg = (unsigned short *) (iovec[0].iov_base +
++ sizeof (struct totempg_mcast));
++ for (i = 0; i < mcast_msg_count; i++) {
++ msg_lens[i] = swab16 (msg_lens_from_msg[i]);
+ }
+
+- msg_count = mcast->msg_count;
+ datasize = sizeof (struct totempg_mcast) +
+- msg_count * sizeof (unsigned short);
++ mcast_msg_count * sizeof (unsigned short);
+
+- memcpy (header, iovec[0].iov_base, datasize);
+ assert(iovec);
+ data = iovec[0].iov_base;
+
+- msg_lens = (unsigned short *) (header + sizeof (struct totempg_mcast));
++ memcpy (&assembly->data[assembly->index], &data[datasize],
++ iovec[0].iov_len - datasize);
++ } else {
++ msg_lens_from_msg = (unsigned short *)iovec[1].iov_base;
+ if (endian_conversion_required) {
+- for (i = 0; i < mcast->msg_count; i++) {
+- msg_lens[i] = swab16 (msg_lens[i]);
++ for (i = 0; i < mcast_msg_count; i++) {
++ msg_lens[i] = swab16 (msg_lens_from_msg[i]);
+ }
++ } else {
++ for (i = 0; i < mcast_msg_count; i++) {
++ msg_lens[i] = msg_lens_from_msg[i];
++ }
+ }
+
+- memcpy (&assembly->data[assembly->index], &data[datasize],
+- iovec[0].iov_len - datasize);
+- } else {
+ /*
+ * The message originated from local processor
+- * becasue there is greater than one iovec for then full msg.
++ * because there is greater than one iovec for the full msg.
+ */
+- h_index = 0;
+- for (i = 0; i < 2; i++) {
+- memcpy (&header[h_index], iovec[i].iov_base, iovec[i].iov_len);
+- h_index += iovec[i].iov_len;
+- }
+-
+- mcast = (struct totempg_mcast *)header;
+-// TODO make sure we are using a copy of mcast not the actual data itself
+-
+- msg_lens = (unsigned short *) (header + sizeof (struct totempg_mcast));
+-
+ for (i = 2; i < iov_len; i++) {
+ a_i = assembly->index;
+ assert (iovec[i].iov_len + a_i <= MESSAGE_SIZE_MAX);
+@@ -541,7 +541,7 @@
+ * then adjust the assembly buffer so we can add the rest of the
+ * fragment when it arrives.
+ */
+- msg_count = mcast->fragmented ? mcast->msg_count - 1 : mcast->msg_count;
++ msg_count = mcast->fragmented ? mcast_msg_count - 1 : mcast_msg_count;
+ continuation = mcast->continuation;
+ iov_delv.iov_base = &assembly->data[0];
+ iov_delv.iov_len = assembly->index + msg_lens[0];
+@@ -567,7 +567,8 @@
|
[-]
[+]
|
Added |
revision-1486.patch
^
|
@@ -0,0 +1,13 @@
+Index: lib/util.c
+===================================================================
+--- lib/util.c (revision 1480)
++++ lib/util.c (revision 1486)
+@@ -552,6 +552,8 @@
+
+ instance = malloc (instanceSize);
+ if (instance == 0) {
++ free (newHandles);
++ pthread_mutex_unlock (&handleDatabase->mutex);
+ return (SA_AIS_ERR_NO_MEMORY);
+ }
+
|
[-]
[+]
|
Added |
revision-1493.patch
^
|
@@ -0,0 +1,530 @@
+Index: exec/cfg.c
+===================================================================
+--- exec/cfg.c (revision 1486)
++++ exec/cfg.c (revision 1493)
+@@ -298,7 +298,7 @@
+ res_lib_cfg_ringstatusget.header.error = SA_AIS_OK;
+
+ totempg_ifaces_get (
+- this_ip->nodeid,
++ totempg_my_nodeid_get(),
+ interfaces,
+ &status,
+ &iface_count);
+Index: exec/evs.c
+===================================================================
+--- exec/evs.c (revision 1486)
++++ exec/evs.c (revision 1493)
+@@ -454,7 +454,7 @@
+ res_lib_evs_membership_get.header.size = sizeof (struct res_lib_evs_membership_get);
+ res_lib_evs_membership_get.header.id = MESSAGE_RES_EVS_MEMBERSHIP_GET;
+ res_lib_evs_membership_get.header.error = EVS_OK;
+- res_lib_evs_membership_get.local_nodeid = this_ip->nodeid;
++ res_lib_evs_membership_get.local_nodeid = totempg_my_nodeid_get ();
+ memcpy (&res_lib_evs_membership_get.member_list,
+ &res_evs_confchg_callback.member_list,
+ sizeof (res_lib_evs_membership_get.member_list));
+Index: exec/cpg.c
+===================================================================
+--- exec/cpg.c (revision 1486)
++++ exec/cpg.c (revision 1493)
+@@ -481,7 +481,7 @@
+
+ if (gi) {
+ notify_info.pid = pi->pid;
+- notify_info.nodeid = this_ip->nodeid;
++ notify_info.nodeid = totempg_my_nodeid_get();
+ notify_info.reason = CONFCHG_CPG_REASON_PROCDOWN;
+ cpg_node_joinleave_send(gi, pi, MESSAGE_REQ_EXEC_CPG_PROCLEAVE, CONFCHG_CPG_REASON_PROCDOWN);
+ list_del(&pi->list);
+@@ -627,8 +627,8 @@
+ lowest_nodeid = member_list[i];
+ }
+
+- log_printf(LOG_LEVEL_DEBUG, "confchg, low nodeid=%d, us = %d\n", lowest_nodeid, this_ip->nodeid);
+- if (lowest_nodeid == this_ip->nodeid) {
++ log_printf(LOG_LEVEL_DEBUG, "confchg, low nodeid=%d, us = %d\n", lowest_nodeid, totempg_my_nodeid_get());
++ if (lowest_nodeid == totempg_my_nodeid_get()) {
+
+ req_exec_cpg_downlist.header.id = SERVICE_ID_MAKE(CPG_SERVICE, MESSAGE_REQ_EXEC_CPG_DOWNLIST);
+ req_exec_cpg_downlist.header.size = sizeof(struct req_exec_cpg_downlist);
+@@ -729,7 +729,7 @@
+ if (pi->pid == pid && pi->nodeid == nodeid) {
+
+ /* It could be a local join message */
+- if ((nodeid == this_ip->nodeid) &&
++ if ((nodeid == totempg_my_nodeid_get()) &&
+ (!pi->flags & PI_FLAG_MEMBER)) {
+ goto local_join;
+ } else {
+@@ -864,7 +864,7 @@
+ nodeid);
+
+ /* Ignore our own messages */
+- if (nodeid == this_ip->nodeid) {
++ if (nodeid == totempg_my_nodeid_get()) {
+ return;
+ }
+
+@@ -943,7 +943,7 @@
+ gi = list_entry(iter, struct group_info, list);
+ for (iter2 = gi->members.next; iter2 != &gi->members; iter2 = iter2->next) {
+ struct process_info *pi = list_entry(iter2, struct process_info, list);
+- if (pi->pid && pi->nodeid == this_ip->nodeid) {
++ if (pi->pid && pi->nodeid == totempg_my_nodeid_get()) {
+ count++;
+ }
+ }
+@@ -970,7 +970,7 @@
+ for (iter2 = gi->members.next; iter2 != &gi->members; iter2 = iter2->next) {
+
+ struct process_info *pi = list_entry(iter2, struct process_info, list);
+- if (pi->pid && pi->nodeid == this_ip->nodeid) {
++ if (pi->pid && pi->nodeid == totempg_my_nodeid_get()) {
+ memcpy(&jle->group_name, &gi->group_name, sizeof(mar_cpg_name_t));
+ jle->pid = pi->pid;
+ jle++;
+@@ -1029,7 +1029,7 @@
+ pi);
+
+ /* Add a node entry for us */
+- pi->nodeid = this_ip->nodeid;
++ pi->nodeid = totempg_my_nodeid_get();
+ pi->pid = req_lib_cpg_join->pid;
+ pi->group = gi;
+ list_add(&pi->list, &gi->members);
+@@ -1213,7 +1213,7 @@
+ res_lib_cpg_local_get.header.size = sizeof(res_lib_cpg_local_get);
+ res_lib_cpg_local_get.header.id = MESSAGE_RES_CPG_LOCAL_GET;
+ res_lib_cpg_local_get.header.error = SA_AIS_OK;
+- res_lib_cpg_local_get.local_nodeid = this_ip->nodeid;
++ res_lib_cpg_local_get.local_nodeid = totempg_my_nodeid_get();
+
+ openais_conn_send_response(conn, &res_lib_cpg_local_get,
+ sizeof(res_lib_cpg_local_get));
+Index: exec/clm.c
+===================================================================
+--- exec/clm.c (revision 1486)
++++ exec/clm.c (revision 1493)
+@@ -262,24 +262,29 @@
+ mar_clm_cluster_node_t cluster_node __attribute__((aligned(8)));
+ };
+
+-static int clm_exec_init_fn (struct objdb_iface_ver0 *objdb)
++static void my_cluster_node_load (void)
+ {
+- log_init ("CLM");
++ struct totem_ip_address interfaces[INTERFACE_MAX];
++ unsigned int iface_count;
++ char **status;
++ const char *iface_string;
+
+- memset (cluster_node_entries, 0,
+- sizeof (mar_clm_cluster_node_t) * PROCESSOR_COUNT_MAX);
++ totempg_ifaces_get (
++ totempg_my_nodeid_get (),
++ interfaces,
++ &status,
++ &iface_count);
+
+- /*
+- * Build local cluster node data structure
+- */
++ iface_string = totemip_print (&interfaces[0]);
++
+ sprintf ((char *)my_cluster_node.node_address.value, "%s",
+- totemip_print (this_ip));
++ iface_string);
+ my_cluster_node.node_address.length =
+ strlen ((char *)my_cluster_node.node_address.value);
+- if (this_ip->family == AF_INET) {
++ if (totempg_my_family_get () == AF_INET) {
+ my_cluster_node.node_address.family = SA_CLM_AF_INET;
+ } else
+- if (this_ip->family == AF_INET6) {
++ if (totempg_my_family_get () == AF_INET6) {
+ my_cluster_node.node_address.family = SA_CLM_AF_INET6;
+ } else {
+ assert (0);
+@@ -289,8 +294,20 @@
+ (char *)my_cluster_node.node_address.value);
+ my_cluster_node.node_name.length =
+ my_cluster_node.node_address.length;
+- my_cluster_node.node_id = this_ip->nodeid;
++ my_cluster_node.node_id = totempg_my_nodeid_get ();
+ my_cluster_node.member = 1;
++
++ memcpy (&cluster_node_entries[0], &my_cluster_node,
++ sizeof (mar_clm_cluster_node_t));
++}
++
++static int clm_exec_init_fn (struct objdb_iface_ver0 *objdb)
++{
++ log_init ("CLM");
++
++ memset (cluster_node_entries, 0,
++ sizeof (mar_clm_cluster_node_t) * PROCESSOR_COUNT_MAX);
++
+ {
+ #if defined(OPENAIS_LINUX)
+ struct sysinfo s_info;
+@@ -313,7 +330,6 @@
+ #endif
+ }
+
+- memcpy (&cluster_node_entries[0], &my_cluster_node, sizeof (mar_clm_cluster_node_t));
+ cluster_node_count = 1;
+
+ main_clm_get_by_nodeid = clm_get_by_nodeid;
+@@ -519,20 +535,7 @@
+ * Load the my_cluster_node data structure in case we are
+ * transitioning to network interface up or down
+ */
+- sprintf ((char *)my_cluster_node.node_address.value, "%s", totemip_print (this_ip));
+- my_cluster_node.node_address.length = strlen ((char *)my_cluster_node.node_address.value);
+- if (this_ip->family == AF_INET) {
+- my_cluster_node.node_address.family = SA_CLM_AF_INET;
+- } else
+- if (this_ip->family == AF_INET6) {
+- my_cluster_node.node_address.family = SA_CLM_AF_INET6;
+- } else {
+- assert (0);
+- }
+- strcpy ((char *)my_cluster_node.node_name.value,
+- (char *)my_cluster_node.node_address.value);
+- my_cluster_node.node_name.length = my_cluster_node.node_address.length;
+- my_cluster_node.node_id = this_ip->nodeid;
++ my_cluster_node_load ();
+ }
+
|
[-]
[+]
|
Added |
revision-1496.patch
^
|
@@ -0,0 +1,217 @@
+Index: exec/totempg.c
+===================================================================
+--- exec/totempg.c (revision 1493)
++++ exec/totempg.c (revision 1496)
+@@ -91,7 +91,6 @@
+ #include <assert.h>
+ #include <pthread.h>
+ #include <errno.h>
+-#include <unistd.h>
+
+ #include "../include/hdb.h"
+ #include "../include/list.h"
+@@ -280,7 +279,7 @@
+ list_add (&assembly->list, &assembly_list_free);
+ }
+
+-static void app_confchg_fn (
++static inline void app_confchg_fn (
+ enum totem_configuration_type configuration_type,
+ unsigned int *member_list, int member_list_entries,
+ unsigned int *left_list, int left_list_entries,
+@@ -313,7 +312,7 @@
+ }
+ }
+
+-static void group_endian_convert (
++static inline void group_endian_convert (
+ struct iovec *iovec)
+ {
+ unsigned short *group_len;
+@@ -324,9 +323,10 @@
+ for (i = 1; i < group_len[0] + 1; i++) {
+ group_len[i] = swab16(group_len[i]);
+ }
++
+ }
+
+-static int group_matches (
++static inline int group_matches (
+ struct iovec *iovec,
+ unsigned int iov_len,
+ struct totempg_group *groups_b,
+@@ -346,8 +346,7 @@
+ */
+ if ((size_t)iovec->iov_base % 4 != 0) {
+ iovec_aligned.iov_base = alloca(iovec->iov_len);
+- memcpy(iovec_aligned.iov_base, iovec->iov_base, iovec->iov_len);
+- iovec_aligned.iov_len = iovec->iov_len;
++ memcpy(iovec_aligned.iov_base, iovec->iov_base, iovec->iov_len); iovec_aligned.iov_len = iovec->iov_len;
+ iovec = &iovec_aligned;
+ }
+
+@@ -381,7 +380,7 @@
+ }
+
+
+-static void app_deliver_fn (
++static inline void app_deliver_fn (
+ unsigned int nodeid,
+ struct iovec *iovec,
+ unsigned int iov_len,
+@@ -394,17 +393,17 @@
+ unsigned int res;
+ struct iovec aligned_iovec = { NULL, 0 };
+
++ if (endian_conversion_required) {
++ group_endian_convert (iovec);
++ }
++
+ /*
+ * Align data structure for sparc and ia64
+ */
+ aligned_iovec.iov_base = alloca(iovec->iov_len);
+ aligned_iovec.iov_len = iovec->iov_len;
+- assert (aligned_iovec.iov_base != NULL);
+ memcpy(aligned_iovec.iov_base, iovec->iov_base, iovec->iov_len);
+ iovec = &aligned_iovec;
+- if (endian_conversion_required) {
+- group_endian_convert (&aligned_iovec);
+- }
+
+ for (i = 0; i <= totempg_max_handle; i++) {
+ res = hdb_handle_get (&totempg_groups_instance_database,
+@@ -412,9 +411,9 @@
+
+ if (res == 0) {
+ assert (iov_len == 1);
+- if (group_matches (&aligned_iovec, iov_len, instance->groups, instance->groups_cnt, &adjust_iovec)) {
+- stripped_iovec.iov_len = aligned_iovec.iov_len - adjust_iovec;
+-// stripped_iovec.iov_base = (char *)aligned_iovec.iov_base + adjust_iovec;
++ if (group_matches (iovec, iov_len, instance->groups, instance->groups_cnt, &adjust_iovec)) {
++ stripped_iovec.iov_len = iovec->iov_len - adjust_iovec;
++// stripped_iovec.iov_base = (char *)iovec->iov_base + adjust_iovec;
+
+ /*
+ * Align data structure for sparc and ia64
+@@ -464,11 +463,11 @@
+ int endian_conversion_required)
+ {
+ struct totempg_mcast *mcast;
+- unsigned short *msg_lens_from_msg;
+- unsigned short msg_lens[1500];
+- unsigned short mcast_msg_count;
++ unsigned short *msg_lens;
+ int i;
+ struct assembly *assembly;
++ char header[FRAME_SIZE_MAX];
++ int h_index;
+ int a_i = 0;
+ int msg_count;
+ int continuation;
+@@ -477,15 +476,8 @@
+ assembly = assembly_ref (nodeid);
+ assert (assembly);
+
+- mcast = (struct totempg_mcast *)iovec[0].iov_base;
+- if (endian_conversion_required) {
+- mcast_msg_count = swab16 (mcast->msg_count);
+- } else {
+- mcast_msg_count = mcast->msg_count;
+- }
+- msg_count = mcast_msg_count;
+-
+ /*
++ * Assemble the header into one block of data and
+ * assemble the packet contents into one block of data to simplify delivery
+ */
+ if (iov_len == 1) {
+@@ -496,36 +488,44 @@
+ char *data;
+ int datasize;
+
+- msg_lens_from_msg = (unsigned short *) (iovec[0].iov_base +
+- sizeof (struct totempg_mcast));
+- for (i = 0; i < mcast_msg_count; i++) {
+- msg_lens[i] = swab16 (msg_lens_from_msg[i]);
++ mcast = (struct totempg_mcast *)iovec[0].iov_base;
++ if (endian_conversion_required) {
++ mcast->msg_count = swab16 (mcast->msg_count);
+ }
+
++ msg_count = mcast->msg_count;
+ datasize = sizeof (struct totempg_mcast) +
+- mcast_msg_count * sizeof (unsigned short);
++ msg_count * sizeof (unsigned short);
+
++ memcpy (header, iovec[0].iov_base, datasize);
+ assert(iovec);
+ data = iovec[0].iov_base;
+
+- memcpy (&assembly->data[assembly->index], &data[datasize],
+- iovec[0].iov_len - datasize);
+- } else {
+- msg_lens_from_msg = (unsigned short *)iovec[1].iov_base;
++ msg_lens = (unsigned short *) (header + sizeof (struct totempg_mcast));
+ if (endian_conversion_required) {
+- for (i = 0; i < mcast_msg_count; i++) {
+- msg_lens[i] = swab16 (msg_lens_from_msg[i]);
++ for (i = 0; i < mcast->msg_count; i++) {
++ msg_lens[i] = swab16 (msg_lens[i]);
+ }
+- } else {
+- for (i = 0; i < mcast_msg_count; i++) {
+- msg_lens[i] = msg_lens_from_msg[i];
+- }
+ }
+
++ memcpy (&assembly->data[assembly->index], &data[datasize],
++ iovec[0].iov_len - datasize);
++ } else {
+ /*
+ * The message originated from local processor
+- * because there is greater than one iovec for the full msg.
++ * becasue there is greater than one iovec for then full msg.
+ */
++ h_index = 0;
++ for (i = 0; i < 2; i++) {
++ memcpy (&header[h_index], iovec[i].iov_base, iovec[i].iov_len);
++ h_index += iovec[i].iov_len;
++ }
++
++ mcast = (struct totempg_mcast *)header;
++// TODO make sure we are using a copy of mcast not the actual data itself
++
++ msg_lens = (unsigned short *) (header + sizeof (struct totempg_mcast));
++
+ for (i = 2; i < iov_len; i++) {
+ a_i = assembly->index;
+ assert (iovec[i].iov_len + a_i <= MESSAGE_SIZE_MAX);
+@@ -541,7 +541,7 @@
+ * then adjust the assembly buffer so we can add the rest of the
+ * fragment when it arrives.
+ */
+- msg_count = mcast->fragmented ? mcast_msg_count - 1 : mcast_msg_count;
++ msg_count = mcast->fragmented ? mcast->msg_count - 1 : mcast->msg_count;
+ continuation = mcast->continuation;
+ iov_delv.iov_base = &assembly->data[0];
+ iov_delv.iov_len = assembly->index + msg_lens[0];
+@@ -567,8 +567,7 @@
|
[-]
[+]
|
Added |
revision-1497.patch
^
|
@@ -0,0 +1,12 @@
+Index: init/redhat
+===================================================================
+--- init/redhat (revision 1496)
++++ init/redhat (revision 1497)
+@@ -15,6 +15,7 @@
+ lockfile="/var/lock/subsys/$prog"
+
+ start() {
++ [ -x "$exec" ] || exit 5
+ echo -n $"Starting OpenAIS daemon ($prog): "
+ daemon $exec
+ retval=$?
|
[-]
[+]
|
Added |
revision-1498.patch
^
|
@@ -0,0 +1,94 @@
+Index: exec/util.c
+===================================================================
+--- exec/util.c (revision 1497)
++++ exec/util.c (revision 1498)
+@@ -84,10 +84,88 @@
+ return time_now;
+ }
+
++struct error_code_entry {
++ enum e_ais_done code;
++ char *string;
++};
+
++static struct error_code_entry error_code_map[] = {
++ {
++ .code = AIS_DONE_EXIT,
++ .string = "finished, exiting normally"
++ },
++ {
++ .code = AIS_DONE_UID_DETERMINE,
++ .string = "could not determine the process UID"
++ },
++ {
++ .code = AIS_DONE_GID_DETERMINE,
++ .string = "could not determine the process GID"
++ },
++ {
++ .code = AIS_DONE_MEMPOOL_INIT,
++ .string = "could not initialize the memory pools"
++ },
++ {
++ .code = AIS_DONE_FORK,
++ .string = "could not fork"
++ },
++ {
++ .code = AIS_DONE_LIBAIS_SOCKET,
++ .string = "could not create a socket"
++ },
++ {
++ .code = AIS_DONE_LIBAIS_BIND,
++ .string = "could not bind to an address"
++ },
++ {
++ .code = AIS_DONE_READKEY,
++ .string = "could not read the security key"
++ },
++ {
++ .code = AIS_DONE_MAINCONFIGREAD,
++ .string = "could not read the main configuration file"
++ },
++ {
++ .code = AIS_DONE_LOGSETUP,
++ .string = "could not setup the logging system"
++ },
++ {
++ .code = AIS_DONE_AMFCONFIGREAD,
++ .string = "could not read the AMF configuration"
++ },
++ {
++ .code = AIS_DONE_DYNAMICLOAD,
++ .string = "could not load a dynamic object"
++ },
++ { .code = AIS_DONE_OBJDB,
++ .string = "could not use the object database"
++ },
++ {
++ .code = AIS_DONE_INIT_SERVICES,
++ .string = "could not initlalize services"
++ },
++ {
++ .code = AIS_DONE_OUT_OF_MEMORY,
++ .string = "Out of memory"
++ },
++ {
++ .code = AIS_DONE_FATAL_ERR,
++ .string = "Unknown fatal error"
++ },
++};
++
+ void openais_exit_error (enum e_ais_done err)
+ {
+- log_printf (LOG_LEVEL_ERROR, "AIS Executive exiting (%d).\n", err);
++ char *error_string = "Error code not available";
++ int i;
++
++ for (i = 0; i < (sizeof (error_code_map) / sizeof (struct error_code_entry)); i++) {
++ if (err == error_code_map[i].code) {
++ error_string = error_code_map[i].string;
++ }
++ }
++ log_printf (LOG_LEVEL_ERROR, "AIS Executive exiting (reason: %s).\n", error_string);
+ log_flush();
+ exit (err);
+ }
|
[-]
[+]
|
Added |
revision-1499.patch
^
|
@@ -0,0 +1,2958 @@
+Index: exec/cfg.c
+===================================================================
+--- exec/cfg.c (revision 1498)
++++ exec/cfg.c (revision 1499)
+@@ -268,7 +268,7 @@
+ res_lib_cfg_ringreenable.header.id = MESSAGE_RES_CFG_RINGREENABLE;
+ res_lib_cfg_ringreenable.header.size = sizeof (struct res_lib_cfg_ringreenable);
+ res_lib_cfg_ringreenable.header.error = SA_AIS_OK;
+- openais_conn_send_response (
++ openais_response_send (
+ req_exec_cfg_ringreenable->source.conn,
+ &res_lib_cfg_ringreenable,
+ sizeof (struct res_lib_cfg_ringreenable));
+@@ -312,7 +312,7 @@
+ strcpy ((char *)&res_lib_cfg_ringstatusget.interface_name[i],
+ totem_ip_string);
+ }
+- openais_conn_send_response (
++ openais_response_send (
+ conn,
+ &res_lib_cfg_ringstatusget,
+ sizeof (struct res_lib_cfg_ringstatusget));
+Index: exec/evs.c
+===================================================================
+--- exec/evs.c (revision 1498)
++++ exec/evs.c (revision 1499)
+@@ -244,7 +244,8 @@
+ */
+ for (list = confchg_notify.next; list != &confchg_notify; list = list->next) {
+ evs_pd = list_entry (list, struct evs_pd, list);
+- openais_conn_send_response (evs_pd->conn,
++ openais_dispatch_send (
++ evs_pd->conn,
+ &res_evs_confchg_callback,
+ sizeof (res_evs_confchg_callback));
+ }
+@@ -262,7 +263,9 @@
+ list_init (&evs_pd->list);
+ list_add (&evs_pd->list, &confchg_notify);
+
+- openais_conn_send_response (conn, &res_evs_confchg_callback,
++ openais_dispatch_send (
++ conn,
++ &res_evs_confchg_callback,
+ sizeof (res_evs_confchg_callback));
+
+ return (0);
+@@ -308,7 +311,9 @@
+ res_lib_evs_join.header.id = MESSAGE_RES_EVS_JOIN;
+ res_lib_evs_join.header.error = error;
+
+- openais_conn_send_response (conn, &res_lib_evs_join,
++ openais_response_send (
++ conn,
++ &res_lib_evs_join,
+ sizeof (struct res_lib_evs_join));
+ }
+
+@@ -354,7 +359,9 @@
+ res_lib_evs_leave.header.id = MESSAGE_RES_EVS_LEAVE;
+ res_lib_evs_leave.header.error = error;
+
+- openais_conn_send_response (conn, &res_lib_evs_leave,
++ openais_response_send (
++ conn,
++ &res_lib_evs_leave,
+ sizeof (struct res_lib_evs_leave));
+ }
+
+@@ -397,7 +404,9 @@
+ res_lib_evs_mcast_joined.header.id = MESSAGE_RES_EVS_MCAST_JOINED;
+ res_lib_evs_mcast_joined.header.error = error;
+
+- openais_conn_send_response (conn, &res_lib_evs_mcast_joined,
++ openais_response_send (
++ conn,
++ &res_lib_evs_mcast_joined,
+ sizeof (struct res_lib_evs_mcast_joined));
+ }
+
+@@ -443,7 +452,9 @@
+ res_lib_evs_mcast_groups.header.id = MESSAGE_RES_EVS_MCAST_GROUPS;
+ res_lib_evs_mcast_groups.header.error = error;
+
+- openais_conn_send_response (conn, &res_lib_evs_mcast_groups,
++ openais_response_send (
++ conn,
++ &res_lib_evs_mcast_groups,
+ sizeof (struct res_lib_evs_mcast_groups));
+ }
+
+@@ -462,7 +473,9 @@
+ res_lib_evs_membership_get.member_list_entries =
+ res_evs_confchg_callback.member_list_entries;
+
+- openais_conn_send_response (conn, &res_lib_evs_membership_get,
++ openais_response_send (
++ conn,
++ &res_lib_evs_membership_get,
+ sizeof (struct res_lib_evs_membership_get));
+ }
+
+@@ -487,8 +500,10 @@
+ int i, j;
+ struct evs_pd *evs_pd;
+
+- res_evs_deliver_callback.header.size = sizeof (struct res_evs_deliver_callback) +
+- req_exec_evs_mcast->msg_len;
++ res_evs_deliver_callback.header.size =
++ sizeof (struct res_evs_deliver_callback) +
++ req_exec_evs_mcast->msg_len;
++
+ res_evs_deliver_callback.header.id = MESSAGE_RES_EVS_DELIVER_CALLBACK;
+ res_evs_deliver_callback.header.error = SA_AIS_OK;
+ res_evs_deliver_callback.msglen = req_exec_evs_mcast->msg_len;
+@@ -517,9 +532,13 @@
+
+ if (found) {
+ res_evs_deliver_callback.local_nodeid = nodeid;
+- openais_conn_send_response (evs_pd->conn, &res_evs_deliver_callback,
++ openais_dispatch_send (
++ evs_pd->conn,
++ &res_evs_deliver_callback,
+ sizeof (struct res_evs_deliver_callback));
+- openais_conn_send_response (evs_pd->conn, msg_addr,
++ openais_dispatch_send (
++ evs_pd->conn,
++ msg_addr,
+ req_exec_evs_mcast->msg_len);
+ }
+ }
+Index: exec/cpg.c
+===================================================================
+--- exec/cpg.c (revision 1498)
++++ exec/cpg.c (revision 1499)
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2006-2007 Red Hat, Inc.
++ * Copyright (c) 2006 Red Hat, Inc.
+ * Copyright (c) 2006 Sun Microsystems, Inc.
+ *
+ * All rights reserved.
+@@ -32,6 +32,9 @@
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
++#ifndef OPENAIS_BSD
++#include <alloca.h>
++#endif
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
+@@ -60,8 +63,11 @@
+ #include "totempg.h"
+ #include "totemip.h"
+ #include "main.h"
++#include "flow.h"
++#include "tlist.h"
+ #include "ipc.h"
+ #include "mempool.h"
++#include "objdb.h"
+ #include "service.h"
+ #include "jhash.h"
+ #include "swab.h"
+@@ -255,7 +261,7 @@
+ };
+
+ struct openais_service_handler cpg_service_handler = {
+- .name = (unsigned char*)"openais cluster closed process group service v1.01",
++ .name = (unsigned char *)"openais cluster closed process group service v1.01",
+ .id = CPG_SERVICE,
+ .private_data_size = sizeof (struct process_info),
+ .flow_control = OPENAIS_FLOW_CONTROL_REQUIRED,
+@@ -434,14 +440,14 @@
+ }
+
+ if (conn) {
+- openais_conn_send_response(conn, buf, size);
++ openais_dispatch_send(conn, buf, size);
+ }
+ else {
+ /* Send it to all listeners */
+ for (iter = gi->members.next, tmp=iter->next; iter != &gi->members; iter = tmp, tmp=iter->next) {
+ struct process_info *pi = list_entry(iter, struct process_info, list);
+ if (pi->trackerconn && (pi->flags & PI_FLAG_MEMBER)) {
+- if (openais_conn_send_response(pi->trackerconn, buf, size) == -1) {
++ if (openais_dispatch_send(pi->trackerconn, buf, size) == -1) {
+ // Error ??
+ }
+ }
+@@ -477,14 +483,17 @@
+ struct group_info *gi = pi->group;
+ mar_cpg_address_t notify_info;
+
+- log_printf(LOG_LEVEL_DEBUG, "exit_fn for conn=%p\n", conn);
+-
+ if (gi) {
+ notify_info.pid = pi->pid;
+ notify_info.nodeid = totempg_my_nodeid_get();
|
[-]
[+]
|
Added |
revision-1500.patch
^
|
@@ -0,0 +1,38 @@
+Index: exec/ipc.c
+===================================================================
+--- exec/ipc.c (revision 1499)
++++ exec/ipc.c (revision 1500)
+@@ -605,15 +605,28 @@
+ ipc_serialize_lock_fn ();
+
+ if (fds == 1 && ufd.revents) {
+- if ((ufd.revents & (POLLERR|POLLHUP)) ||
+- (conn_info &&
+- conn_info->state == CONN_INFO_STATE_DISCONNECT_REQUESTED)) {
++ if (ufd.revents & (POLLERR|POLLHUP)) {
+ disconnect_request (conn_info);
++ conn_info_refcnt_dec (conn_info);
++ conn_io_refcnt_dec (conn_io);
++ /*
++ * If conn_info not set, wait for it to be set
++ * else break out of for loop
++ */
++ if (conn_info == NULL) {
++ ipc_serialize_unlock_fn ();
++ continue;
++ } else {
++ ipc_serialize_unlock_fn ();
++ break;
++ }
++ }
+
++ if (conn_info && conn_info->state == CONN_INFO_STATE_DISCONNECT_REQUESTED) {
++ conn_info_refcnt_dec (conn_info);
+ conn_io_refcnt_dec (conn_io);
+- conn_info_refcnt_dec (conn_info);
+ ipc_serialize_unlock_fn ();
+- break; /* from for */
++ break;
+ }
+
+ if (ufd.revents & POLLOUT) {
|
[-]
[+]
|
Added |
revision-1501.patch
^
|
@@ -0,0 +1,13 @@
+Index: exec/cpg.c
+===================================================================
+--- exec/cpg.c (revision 1500)
++++ exec/cpg.c (revision 1501)
+@@ -934,7 +934,7 @@
+ /* Send to all interested members */
+ for (iter = gi->members.next; iter != &gi->members; iter = iter->next) {
+ struct process_info *pi = list_entry(iter, struct process_info, list);
+- if (pi->trackerconn) {
++ if (pi->trackerconn && (pi->flags & PI_FLAG_MEMBER)) {
+ openais_dispatch_send (
+ pi->trackerconn,
+ buf,
|
[-]
[+]
|
Added |
revision-1502.patch
^
|
@@ -0,0 +1,41 @@
+Index: exec/totemsrp.c
+===================================================================
+--- exec/totemsrp.c (revision 1501)
++++ exec/totemsrp.c (revision 1502)
+@@ -495,8 +495,6 @@
+ unsigned int my_pbl;
+
+ unsigned int my_cbl;
+-
+- unsigned int operational_entered_once;
+ };
+
+ struct message_handlers {
+@@ -1682,8 +1680,6 @@
+
+ instance->my_received_flg = 0;
+
+- instance->operational_entered_once = 1;
+-
+ return;
+ }
+
+@@ -2769,17 +2765,7 @@
+
+ totemip_copy(&commit_token->ring_id.rep, &instance->my_id.addr[0]);
+
+- /*
+- * The first time operational is entered, don't increment the ring
+- * sequence number (just reload it from stable storage). This prevents
+- * an error condition where if the executive is stopped and started
+- * before a new ring is formed, the protocol will get stuck in recovery.
+- */
+- if (instance->operational_entered_once) {
+- commit_token->ring_id.seq = instance->token_ring_id_seq + 4;
+- } else {
+- commit_token->ring_id.seq = instance->token_ring_id_seq;
+- }
++ commit_token->ring_id.seq = instance->token_ring_id_seq + 4;
+
+ /*
+ * This qsort is necessary to ensure the commit token traverses
|
[-]
[+]
|
Added |
revision-1503.patch
^
|
@@ -0,0 +1,49 @@
+Index: exec/main.c
+===================================================================
+--- exec/main.c (revision 1502)
++++ exec/main.c (revision 1503)
+@@ -270,7 +270,6 @@
+
+ static void aisexec_tty_detach (void)
+ {
+-#ifndef DEBUG
+ /*
+ * Disconnect from TTY if this is not a debug run
+ */
+@@ -287,7 +286,6 @@
+ exit (0);
+ break;
+ }
+-#endif
+ }
+
+ static void aisexec_setscheduler (void)
+@@ -400,9 +398,27 @@
+ int res;
+ int totem_log_service;
+ log_init ("MAIN");
++ unsigned int background;
++ int ch;
+
+- aisexec_tty_detach ();
++ background = 1;
+
++ while ((ch = getopt (argc, argv, "fp")) != EOF) {
++ switch (ch) {
++ case 'f':
++ background = 0;
++ break;
++ default:
++ fprintf (stderr, "Usage:\n");
++ fprintf (stderr, " -f : Start application in forground.\n");
++ return EXIT_FAILURE;
++ }
++ }
++
++ if (background) {
++ aisexec_tty_detach ();
++ }
++
+ log_printf (LOG_LEVEL_NOTICE, "AIS Executive Service RELEASE '%s'\n", RELEASE_VERSION);
+ log_printf (LOG_LEVEL_NOTICE, "Copyright (C) 2002-2006 MontaVista Software, Inc and contributors.\n");
+ log_printf (LOG_LEVEL_NOTICE, "Copyright (C) 2006 Red Hat, Inc.\n");
|
[-]
[+]
|
Added |
revision-1504.patch
^
|
@@ -0,0 +1,111 @@
+Index: exec/ckpt.c
+===================================================================
+--- exec/ckpt.c (revision 1503)
++++ exec/ckpt.c (revision 1504)
+@@ -377,11 +377,11 @@
+
+ static struct list_head *my_iteration_state_section;
+
+-static unsigned int my_member_list[PROCESSOR_COUNT_MAX];
++static unsigned int my_old_member_list[PROCESSOR_COUNT_MAX];
+
+-static unsigned int my_member_list_entries = 0;
++static unsigned int my_old_member_list_entries = 0;
+
+-static unsigned int my_lowest_nodeid = 0;
++static unsigned int my_should_sync = 0;
+
+ struct checkpoint_cleanup {
+ struct list_head list;
+@@ -809,38 +809,33 @@
+ struct memb_ring_id *ring_id)
+ {
+ unsigned int i, j;
++ unsigned int lowest_nodeid;
+
+- /*
+- * Determine lowest nodeid in old regular configuration for the
+- * purpose of executing the synchronization algorithm
+- */
+- if (configuration_type == TOTEM_CONFIGURATION_TRANSITIONAL) {
+- for (i = 0; i < left_list_entries; i++) {
+- for (j = 0; j < my_member_list_entries; j++) {
+- if (left_list[i] == my_member_list[j]) {
+- my_member_list[j] = 0;
+- }
+- }
+- }
+- }
+-
+- my_lowest_nodeid = 0xffffffff;
++ my_should_sync = 0;
+
+ /*
+ * Handle regular configuration
+ */
++ lowest_nodeid = 0xffffffff;
++
+ if (configuration_type == TOTEM_CONFIGURATION_REGULAR) {
+- memcpy (my_member_list, member_list,
+- sizeof (unsigned int) * member_list_entries);
+- my_member_list_entries = member_list_entries;
++ for (i = 0; i < my_old_member_list_entries; i++) {
++ for (j = 0; j < member_list_entries; j++) {
++ if (my_old_member_list[i] == member_list[j]) {
++ if (lowest_nodeid > member_list[j]) {
++ lowest_nodeid = member_list[j];
++ }
++ }
++ }
++ }
+ memcpy (&my_saved_ring_id, ring_id,
+ sizeof (struct memb_ring_id));
+- for (i = 0; i < my_member_list_entries; i++) {
+- if ((my_member_list[i] != 0) &&
+- (my_member_list[i] < my_lowest_nodeid)) {
++ memcpy (my_old_member_list, member_list,
++ sizeof (unsigned int) * member_list_entries);
++ my_old_member_list_entries = member_list_entries;
+
+- my_lowest_nodeid = my_member_list[i];
+- }
++ if (lowest_nodeid == totempg_my_nodeid_get()) {
++ my_should_sync = 1;
+ }
+ }
+ }
+@@ -2658,8 +2653,6 @@
+ struct req_exec_ckpt_sectioncreate req_exec_ckpt_sectioncreate;
+ struct iovec iovecs[2];
+
+- log_printf (LOG_LEVEL_DEBUG, "Section create from conn %p\n", conn);
+-
+ req_exec_ckpt_sectioncreate.header.id =
+ SERVICE_ID_MAKE (CKPT_SERVICE,
+ MESSAGE_REQ_EXEC_CKPT_SECTIONCREATE);
+@@ -2695,7 +2688,6 @@
+ }
+
+ if (iovecs[1].iov_len > 0) {
+- log_printf (LOG_LEVEL_DEBUG, "IOV_BASE is %p\n", iovecs[1].iov_base);
+ assert (totempg_groups_mcast_joined (openais_group_handle, iovecs, 2, TOTEMPG_AGREED) == 0);
+ } else {
+ assert (totempg_groups_mcast_joined (openais_group_handle, iovecs, 1, TOTEMPG_AGREED) == 0);
+@@ -3575,7 +3567,7 @@
+
+ switch (my_sync_state) {
+ case SYNC_STATE_CHECKPOINT:
+- if (my_lowest_nodeid == totempg_my_nodeid_get()) {
++ if (my_should_sync) {
+ TRACE1 ("should transmit checkpoints because lowest member in old configuration.\n");
+ res = sync_checkpoints_iterate ();
+
+@@ -3595,7 +3587,7 @@
+
+ case SYNC_STATE_REFCOUNT:
+ done_queueing = 1;
+- if (my_lowest_nodeid == totempg_my_nodeid_get()) {
++ if (my_should_sync) {
+ TRACE1 ("transmit refcounts because this processor is the lowest member in old configuration.\n");
+ res = sync_refcounts_iterate ();
+ }
|
[-]
[+]
|
Added |
revision-1506.patch
^
|
@@ -0,0 +1,238 @@
+Index: exec/ckpt.c
+===================================================================
+--- exec/ckpt.c (revision 1505)
++++ exec/ckpt.c (revision 1506)
+@@ -1,6 +1,6 @@
+ /*
+ * Copyright (c) 2003-2006 MontaVista Software, Inc.
+- * Copyright (c) 2006-2007 Red Hat, Inc.
++ * Copyright (c) 2006-2008 Red Hat, Inc.
+ *
+ * All rights reserved.
+ *
+@@ -373,9 +373,9 @@
+
+ static enum iteration_state my_iteration_state;
+
+-static struct list_head *my_iteration_state_checkpoint;
++static struct list_head *my_iteration_state_checkpoint_list;
+
+-static struct list_head *my_iteration_state_section;
++static struct list_head *my_iteration_state_section_list;
+
+ static unsigned int my_old_member_list[PROCESSOR_COUNT_MAX];
+
+@@ -759,48 +759,6 @@
+ /*
+ * Implementation
+ */
+-
+-void clean_checkpoint_list(struct list_head *head)
+-{
+- struct list_head *checkpoint_list;
+- struct checkpoint *checkpoint;
+-
+- if (list_empty(head)) {
+- log_printf (LOG_LEVEL_DEBUG, "clean_checkpoint_list: List is empty \n");
+- return;
+- }
+-
+- checkpoint_list = head->next;
+- while (checkpoint_list != head) {
+- checkpoint = list_entry (checkpoint_list,
+- struct checkpoint, list);
+- assert (checkpoint > 0);
+-
+- /*
+- * If checkpoint has been unlinked and this is the last reference, delete it
+- */
+- if (checkpoint->unlinked && checkpoint->reference_count == 0) {
+- log_printf (LOG_LEVEL_DEBUG,"clean_checkpoint_list: deallocating checkpoint %s.\n",
+- checkpoint->name.value);
+- checkpoint_list = checkpoint_list->next;
+- checkpoint_release (checkpoint);
+- continue;
+-
+- }
+- else if (checkpoint->reference_count == 0) {
+- log_printf (LOG_LEVEL_DEBUG, "clean_checkpoint_list: Starting timer to release checkpoint %s.\n",
+- checkpoint->name.value);
+- openais_timer_delete (checkpoint->retention_timer);
+- openais_timer_add_duration (
+- checkpoint->checkpoint_creation_attributes.retention_duration,
+- checkpoint,
+- timer_function_retention,
+- &checkpoint->retention_timer);
+- }
+- checkpoint_list = checkpoint_list->next;
+- }
+-}
+-
+ static void ckpt_confchg_fn (
+ enum totem_configuration_type configuration_type,
+ unsigned int *member_list, int member_list_entries,
+@@ -3369,11 +3327,11 @@
+
+ my_sync_state = SYNC_STATE_CHECKPOINT;
+ my_iteration_state = ITERATION_STATE_CHECKPOINT;
+- my_iteration_state_checkpoint = checkpoint_list_head.next;
++ my_iteration_state_checkpoint_list = checkpoint_list_head.next;
+
+ checkpoint = list_entry (checkpoint_list_head.next, struct checkpoint,
+ list);
+- my_iteration_state_section = checkpoint->sections_list_head.next;
++ my_iteration_state_section_list = checkpoint->sections_list_head.next;
+
+ LEAVE();
+ }
+@@ -3381,6 +3339,8 @@
+ static inline void sync_refcounts_enter (void)
+ {
+ my_sync_state = SYNC_STATE_REFCOUNT;
++
++ my_iteration_state_checkpoint_list = checkpoint_list_head.next;
+ }
+
+ static void ckpt_sync_init (void)
+@@ -3516,25 +3476,62 @@
+ struct list_head *section_list;
+ unsigned int res = 0;
+
+- for (checkpoint_list = checkpoint_list_head.next;
++ /*
++ * iterate through all checkpoints or sections
++ * from the last successfully transmitted checkpoint or sectoin
++ */
++ for (checkpoint_list = my_iteration_state_checkpoint_list;
+ checkpoint_list != &checkpoint_list_head;
+ checkpoint_list = checkpoint_list->next) {
+
+ checkpoint = list_entry (checkpoint_list, struct checkpoint, list);
+
+- res = sync_checkpoint_transmit (checkpoint);
+- if (res != 0) {
+- break;
++ /*
++ * Synchronize a checkpoint if there is room in the totem
++ * buffers and we didn't previously synchronize a checkpoint
++ */
++ if (my_iteration_state == ITERATION_STATE_CHECKPOINT) {
++ res = sync_checkpoint_transmit (checkpoint);
++ if (res != 0) {
++ /*
++ * Couldn't sync this checkpoint keep processing
++ */
++ return (-1);
++ }
++ my_iteration_state_section_list = checkpoint->sections_list_head.next;
++ my_iteration_state = ITERATION_STATE_SECTION;
+ }
+- for (section_list = checkpoint->sections_list_head.next;
++
++ /*
++ * Synchronize a checkpoint section if there is room in the
++ * totem buffers
++ */
++ for (section_list = my_iteration_state_section_list;
+ section_list != &checkpoint->sections_list_head;
+ section_list = section_list->next) {
+
+ checkpoint_section = list_entry (section_list, struct checkpoint_section, list);
+ res = sync_checkpoint_section_transmit (checkpoint, checkpoint_section);
++ if (res != 0) {
++ /*
++ * Couldn't sync this section keep processing
++ */
++ return (-1);
++ }
++ my_iteration_state_section_list = section_list->next;
+ }
++
++ /*
++ * Continue to iterating checkpoints
++ */
++ my_iteration_state = ITERATION_STATE_CHECKPOINT;
++ my_iteration_state_checkpoint_list = checkpoint_list->next;
+ }
+- return (res);
++
++ /*
++ * all checkpoints and sections iterated
++ */
++ return (0);
+ }
+
+ unsigned int sync_refcounts_iterate (void)
+@@ -3543,7 +3540,7 @@
+ struct list_head *list;
+ unsigned int res = 0;
+
+- for (list = checkpoint_list_head.next;
++ for (list = my_iteration_state_checkpoint_list;
+ list != &checkpoint_list_head;
+ list = list->next) {
+
+@@ -3553,47 +3550,50 @@
+ if (res != 0) {
+ break;
+ }
++ my_iteration_state_checkpoint_list = list->next;
+ }
+ return (res);
+ }
+
+ static int ckpt_sync_process (void)
+ {
+- unsigned int done_queueing = 1;
+- unsigned int continue_processing = 0;
++ unsigned int done_queueing;
++ unsigned int continue_processing;
+ unsigned int res;
+
+ ENTER();
+
++ continue_processing = 0;
++
+ switch (my_sync_state) {
+ case SYNC_STATE_CHECKPOINT:
++ done_queueing = 1;
++ continue_processing = 1;
|
[-]
[+]
|
Added |
revision-1507.patch
^
|
@@ -0,0 +1,22 @@
+Index: lib/ckpt.c
+===================================================================
+--- lib/ckpt.c (revision 1506)
++++ lib/ckpt.c (revision 1507)
+@@ -200,8 +200,6 @@
+
+ saHandleDestroy (&ckptSectionIterationHandleDatabase,
+ ckptSectionIterationInstance->sectionIterationHandle);
+-
+- pthread_mutex_destroy (&ckptSectionIterationInstance->response_mutex);
+ }
+
+ static void ckptCheckpointInstanceFinalize (struct ckptCheckpointInstance *ckptCheckpointInstance)
+@@ -225,8 +223,6 @@
+ list_del (&ckptCheckpointInstance->list);
+
+ saHandleDestroy (&checkpointHandleDatabase, ckptCheckpointInstance->checkpointHandle);
+-
+- pthread_mutex_destroy (&ckptCheckpointInstance->response_mutex);
+ }
+
+ static void ckptInstanceFinalize (struct ckptInstance *ckptInstance)
|
[-]
[+]
|
Added |
revision-1508.patch
^
|
@@ -0,0 +1,15 @@
+Index: lib/clm.c
+===================================================================
+--- lib/clm.c (revision 1507)
++++ lib/clm.c (revision 1508)
+@@ -498,10 +498,7 @@
+ clmInstance->finalize = 1;
+
+ pthread_mutex_unlock (&clmInstance->response_mutex);
+- pthread_mutex_destroy (&clmInstance->response_mutex);
+
+- pthread_mutex_destroy (&clmInstance->dispatch_mutex);
+-
+ saHandleDestroy (&clmHandleDatabase, clmHandle);
+
+ if (clmInstance->response_fd != -1) {
|
[-]
[+]
|
Added |
revision-1509.patch
^
|
@@ -0,0 +1,24 @@
+Index: lib/cpg.c
+===================================================================
+--- lib/cpg.c (revision 1508)
++++ lib/cpg.c (revision 1509)
+@@ -1,7 +1,7 @@
+ /*
+ * vi: set autoindent tabstop=4 shiftwidth=4 :
+ *
+- * Copyright (c) 2006-2007 Red Hat, Inc.
++ * Copyright (c) 2006-2008 Red Hat, Inc.
+ *
+ * All rights reserved.
+ *
+@@ -156,10 +156,7 @@
+ cpg_inst->finalize = 1;
+
+ pthread_mutex_unlock (&cpg_inst->response_mutex);
+- pthread_mutex_destroy (&cpg_inst->response_mutex);
+
+- pthread_mutex_destroy (&cpg_inst->dispatch_mutex);
+-
+ saHandleDestroy (&cpg_handle_t_db, handle);
+
+ /*
|
[-]
[+]
|
Added |
revision-1510.patch
^
|
@@ -0,0 +1,15 @@
+Index: lib/evs.c
+===================================================================
+--- lib/evs.c (revision 1509)
++++ lib/evs.c (revision 1510)
+@@ -166,10 +166,7 @@
+ evs_inst->finalize = 1;
+
+ pthread_mutex_unlock (&evs_inst->response_mutex);
+- pthread_mutex_destroy (&evs_inst->response_mutex);
+
+- pthread_mutex_destroy (&evs_inst->dispatch_mutex);
+-
+ saHandleDestroy (&evs_handle_t_db, handle);
+ /*
+ * Disconnect from the server
|
[-]
[+]
|
Added |
revision-1511.patch
^
|
@@ -0,0 +1,15 @@
+Index: lib/evt.c
+===================================================================
+--- lib/evt.c (revision 1510)
++++ lib/evt.c (revision 1511)
+@@ -904,10 +904,7 @@
+ evti->ei_finalize = 1;
+
+ pthread_mutex_unlock (&evti->ei_response_mutex);
+- pthread_mutex_destroy (&evti->ei_response_mutex);
+
+- pthread_mutex_destroy (&evti->ei_dispatch_mutex);
+-
+ saHandleDestroy(&evt_instance_handle_db, evtHandle);
+ /*
+ * Disconnect from the server
|
[-]
[+]
|
Added |
revision-1512.patch
^
|
@@ -0,0 +1,20 @@
+Index: exec/sync.c
+===================================================================
+--- exec/sync.c (revision 1511)
++++ exec/sync.c (revision 1512)
+@@ -429,6 +429,7 @@
+ sizeof (barrier_data_confchg));
+
+ sync_callbacks_load();
++log_printf (LOG_LEVEL_NOTICE, "sync_callbacks_load\n");
+
+ /*
+ * if sync service found, execute it
+@@ -457,6 +458,7 @@
+ }
+ if (sync_processing && sync_callbacks.sync_abort != NULL) {
+ sync_callbacks.sync_abort ();
++ sync_callbacks.sync_activate = NULL;
+ }
+ /*
+ * If no virtual synchrony filter configured, then start
|
[-]
[+]
|
Added |
revision-1513.patch
^
|
@@ -0,0 +1,13 @@
+Index: lib/util.c
+===================================================================
+--- lib/util.c (revision 1512)
++++ lib/util.c (revision 1513)
+@@ -543,7 +543,7 @@
+ handleDatabase->handleCount += 1;
+ newHandles = (struct saHandle *)realloc (handleDatabase->handles,
+ sizeof (struct saHandle) * handleDatabase->handleCount);
+- if (newHandles == 0) {
++ if (newHandles == NULL) {
+ pthread_mutex_unlock (&handleDatabase->mutex);
+ return (SA_AIS_ERR_NO_MEMORY);
+ }
|
[-]
[+]
|
Added |
revision-1514.patch
^
|
@@ -0,0 +1,12 @@
+Index: exec/sync.c
+===================================================================
+--- exec/sync.c (revision 1513)
++++ exec/sync.c (revision 1514)
+@@ -429,7 +429,6 @@
+ sizeof (barrier_data_confchg));
+
+ sync_callbacks_load();
+-log_printf (LOG_LEVEL_NOTICE, "sync_callbacks_load\n");
+
+ /*
+ * if sync service found, execute it
|
[-]
[+]
|
Added |
openais.init
^
|
@@ -0,0 +1,98 @@
+#! /bin/sh
+#
+# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
+#
+# CoAuthor: Mr.Bool <mr.bool@rambler.ru> ;-)
+#
+# /etc/init.d/openais
+#
+# and symbolic its link
+#
+# /usr/sbin/rcopenais
+#
+### BEGIN INIT INFO
+# Provides: openais
+# Required-Start:
+# Required-Stop:
+# Default-Start: 3 5
+# Default-Stop: 0 6
+# Description: Start the openais daemon
+### END INIT INFO
+
+. /etc/rc.status
+
+[ -f /etc/sysconfig/openais ] && . /etc/sysconfig/openais
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v ditto but be verbose in local rc status
+# rc_status -v -r ditto and clear the local rc status
+# rc_failed set local and overall rc status to failed
+# rc_reset clear local rc status (overall remains)
+# rc_exit exit appropriate to overall rc status
+
+# First reset status of this service
+rc_reset
+
+OPENAIS_EXEC="/usr/sbin/aisexec"
+
+case "$1" in
+ start)
+ echo -n "Starting OpenAIS daemon"
+ ## Start daemon with startproc(8). If this fails
+ ## the echo return value is set appropriate.
+
+ startproc -f -q $OPENAIS_EXEC $OPENAIS_ARGS
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down OpenAIS daemon"
+ ## Stop daemon with killproc(8) and if this fails
+ ## set echo the echo return value.
+
+ killproc $OPENAIS_EXEC
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ try-restart)
+ ## Stop the service and if this succeeds (i.e. the
+ ## service was running before), start it again.
+ $0 status >/dev/null && $0 restart
+
+ # Remember status and be quiet
+ rc_status
+ ;;
+ restart|force-reload|reload)
+ ## Stop the service and regardless of whether it was
+ ## running or not, start it again.
+ $0 stop
+ $0 start
+
+ # Remember status and be quiet
+ rc_status
+ ;;
+ status)
+ echo -n "Checking for service OpenAIS:"
+ ## Check status with checkproc(8), if process is running
+ ## checkproc will return with exit status 0.
+
+ # Status has a slightly different for the status command:
+ # 0 - service running
+ # 1 - service dead, but /var/run/ pid file exists
+ # 2 - service dead, but /var/lock/ lock file exists
+ # 3 - service not running
+
+ checkproc $OPENAIS_EXEC
+
+ rc_status -v
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+ exit 1
+ ;;
+esac
+rc_exit
|