rpms/openais/devel openais-trunk-1682.diff, NONE, 1.1 openais.spec, 1.32, 1.33 openais-trunk-1667.diff, 1.1, NONE
Fabio M. Di Nitto
fabbione at fedoraproject.org
Tue Jan 27 10:46:33 UTC 2009
Author: fabbione
Update of /cvs/pkgs/rpms/openais/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9109
Modified Files:
openais.spec
Added Files:
openais-trunk-1682.diff
Removed Files:
openais-trunk-1667.diff
Log Message:
Update to latest svn snapshot
openais-trunk-1682.diff:
--- NEW FILE openais-trunk-1682.diff ---
diff -Naurd openais-0.91/include/mar_clm.h openais-trunk/include/mar_clm.h
--- openais-0.91/include/mar_clm.h 2008-08-14 17:00:36.000000000 +0200
+++ openais-trunk/include/mar_clm.h 2008-11-25 18:39:02.000000000 +0100
@@ -39,6 +39,7 @@
#include <corosync/swab.h>
#include "saAis.h"
#include "saClm.h"
+#include "mar_sa.h"
#include <corosync/mar_gen.h>
#define MAR_CLM_MAX_ADDRESS_LENGTH 64
@@ -110,7 +111,7 @@
dest->node_id = src->nodeId;
marshall_to_mar_clm_node_address_t (&dest->node_address,
&src->nodeAddress);
- marshall_to_mar_name_t (&dest->node_name, &src->nodeName);
+ marshall_SaNameT_to_mar_name_t (&dest->node_name, &src->nodeName);
dest->member = src->member;
dest->boot_timestamp = src->bootTimestamp;
dest->initial_view_number = src->initialViewNumber;
@@ -123,7 +124,7 @@
dest->nodeId = src->node_id;
marshall_from_mar_clm_node_address_t (&dest->nodeAddress,
&src->node_address);
- marshall_from_mar_name_t (&dest->nodeName, &src->node_name);
+ marshall_mar_name_t_to_SaNameT (&dest->nodeName, &src->node_name);
dest->member = src->member;
dest->bootTimestamp = src->boot_timestamp;
dest->initialViewNumber = src->initial_view_number;
diff -Naurd openais-0.91/include/mar_sa.h openais-trunk/include/mar_sa.h
--- openais-0.91/include/mar_sa.h 1970-01-01 01:00:00.000000000 +0100
+++ openais-trunk/include/mar_sa.h 2008-12-07 18:43:30.000000000 +0100
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2008, Allied Telesis Labs, New Zealand
+ *
+ * All rights reserved.
+ *
+ * Author: Angus Salkeld (ahsalkeld at gmail.com)
+ *
+ * This software licensed under BSD license, the text of which follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name of the MontaVista Software, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AIS_MAR_SA_H_DEFINED
+#define AIS_MAR_SA_H_DEFINED
+
+static inline void marshall_SaNameT_to_mar_name_t (
+ mar_name_t *dest,
+ const SaNameT *src)
+{
+ dest->length = src->length;
+ memcpy (dest->value, src->value, SA_MAX_NAME_LENGTH);
+}
+
+static inline void marshall_mar_name_t_to_SaNameT (
+ SaNameT *dest,
+ const mar_name_t *src)
+{
+ dest->length = src->length;
+ memcpy (dest->value, src->value, SA_MAX_NAME_LENGTH);
+}
+
+#endif /* AIS_MAR_SA_H_DEFINED */
+
diff -Naurd openais-0.91/lib/amf.c openais-trunk/lib/amf.c
--- openais-0.91/lib/amf.c 2008-09-17 21:18:35.000000000 +0200
+++ openais-trunk/lib/amf.c 2008-11-25 18:39:02.000000000 +0100
@@ -49,7 +49,7 @@
#include <saAmf.h>
#include <corosync/ipc_gen.h>
#include <ipc_amf.h>
-#include <corosync/ais_util.h>
+#include "util.h"
struct res_overlay {
diff -Naurd openais-0.91/lib/ckpt.c openais-trunk/lib/ckpt.c
--- openais-0.91/lib/ckpt.c 2008-07-24 15:20:09.000000000 +0200
+++ openais-trunk/lib/ckpt.c 2009-01-06 04:58:18.000000000 +0100
@@ -53,8 +53,9 @@
#include "../include/saCkpt.h"
#include "../include/ipc_ckpt.h"
#include "../include/mar_ckpt.h"
+#include "../include/mar_sa.h"
-#include <corosync/ais_util.h>
+#include "util.h"
struct message_overlay {
mar_res_header_t header __attribute__((aligned(8)));
@@ -634,7 +635,7 @@
req_lib_ckpt_checkpointopen.header.size = sizeof (struct req_lib_ckpt_checkpointopen);
req_lib_ckpt_checkpointopen.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPEN;
- marshall_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
(SaNameT *)checkpointName);
memcpy (&ckptCheckpointInstance->checkpointName, checkpointName, sizeof (SaNameT));
req_lib_ckpt_checkpointopen.async_call = 0;
@@ -759,7 +760,7 @@
if (failWithError == SA_AIS_OK) {
memcpy (&ckptCheckpointInstance->checkpointName, checkpointName,
sizeof (SaNameT));
- marshall_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
(SaNameT *)checkpointName);
}
@@ -800,7 +801,7 @@
saHandleInstancePut (&ckptHandleDatabase, ckptHandle);
- return (error == SA_AIS_OK ? res_lib_ckpt_checkpointopenasync.header.error : error);
+ return (SA_AIS_OK);
error_put_destroy:
saHandleInstancePut (&checkpointHandleDatabase, checkpointHandle);
@@ -829,7 +830,7 @@
req_lib_ckpt_checkpointclose.header.size = sizeof (struct req_lib_ckpt_checkpointclose);
req_lib_ckpt_checkpointclose.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTCLOSE;
- marshall_to_mar_name_t (&req_lib_ckpt_checkpointclose.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointclose.checkpoint_name,
&ckptCheckpointInstance->checkpointName);
req_lib_ckpt_checkpointclose.ckpt_id =
ckptCheckpointInstance->checkpointId;
@@ -877,7 +878,7 @@
req_lib_ckpt_checkpointunlink.header.size = sizeof (struct req_lib_ckpt_checkpointunlink);
req_lib_ckpt_checkpointunlink.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTUNLINK;
- marshall_to_mar_name_t (&req_lib_ckpt_checkpointunlink.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointunlink.checkpoint_name,
(SaNameT *)checkpointName);
pthread_mutex_lock (&ckptInstance->response_mutex);
@@ -916,7 +917,7 @@
req_lib_ckpt_checkpointretentiondurationset.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET;
req_lib_ckpt_checkpointretentiondurationset.retention_duration = retentionDuration;
- marshall_to_mar_name_t (&req_lib_ckpt_checkpointretentiondurationset.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointretentiondurationset.checkpoint_name,
&ckptCheckpointInstance->checkpointName);
req_lib_ckpt_checkpointretentiondurationset.ckpt_id =
ckptCheckpointInstance->checkpointId;
@@ -957,7 +958,7 @@
req_lib_ckpt_activereplicaset.header.size = sizeof (struct req_lib_ckpt_activereplicaset);
req_lib_ckpt_activereplicaset.header.id = MESSAGE_REQ_CKPT_ACTIVEREPLICASET;
- marshall_to_mar_name_t (&req_lib_ckpt_activereplicaset.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_activereplicaset.checkpoint_name,
&ckptCheckpointInstance->checkpointName);
req_lib_ckpt_activereplicaset.ckpt_id =
ckptCheckpointInstance->checkpointId;
@@ -1000,7 +1001,7 @@
req_lib_ckpt_checkpointstatusget.header.size = sizeof (struct req_lib_ckpt_checkpointstatusget);
req_lib_ckpt_checkpointstatusget.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET;
- marshall_to_mar_name_t (&req_lib_ckpt_checkpointstatusget.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointstatusget.checkpoint_name,
&ckptCheckpointInstance->checkpointName);
req_lib_ckpt_checkpointstatusget.ckpt_id =
ckptCheckpointInstance->checkpointId;
@@ -1065,7 +1066,7 @@
req_lib_ckpt_sectioncreate.expiration_time = sectionCreationAttributes->expirationTime;
req_lib_ckpt_sectioncreate.initial_data_size = initialDataSize;
- marshall_to_mar_name_t (&req_lib_ckpt_sectioncreate.checkpoint_name,
+ marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_sectioncreate.checkpoint_name,
&ckptCheckpointInstance->checkpointName);
req_lib_ckpt_sectioncreate.ckpt_id =
ckptCheckpointInstance->checkpointId;
@@ -1137,7 +1138,7 @@
req_lib_ckpt_sectiondelete.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONDELETE;
req_lib_ckpt_sectiondelete.id_len = sectionId->idLen;
[...2279 lines suppressed...]
@@ -1754,7 +1754,7 @@
&checkpoint_list_head,
&req_exec_ckpt_sectioncreate->checkpoint_name,
req_exec_ckpt_sectioncreate->ckpt_id);
- if (checkpoint == 0) {
+ if (checkpoint == NULL) {
error = SA_AIS_ERR_NOT_EXIST;
goto error_exit;
}
@@ -1917,7 +1917,7 @@
&checkpoint_list_head,
&req_exec_ckpt_sectiondelete->checkpoint_name,
req_exec_ckpt_sectiondelete->ckpt_id);
- if (checkpoint == 0) {
+ if (checkpoint == NULL) {
error = SA_AIS_ERR_NOT_EXIST;
goto error_exit;
}
@@ -1985,7 +1985,7 @@
&checkpoint_list_head,
&req_exec_ckpt_sectionexpirationtimeset->checkpoint_name,
req_exec_ckpt_sectionexpirationtimeset->ckpt_id);
- if (checkpoint == 0) {
+ if (checkpoint == NULL) {
error = SA_AIS_ERR_NOT_EXIST;
goto error_exit;
}
@@ -2079,7 +2079,7 @@
&checkpoint_list_head,
&req_exec_ckpt_sectionwrite->checkpoint_name,
req_exec_ckpt_sectionwrite->ckpt_id);
- if (checkpoint == 0) {
+ if (checkpoint == NULL) {
log_printf (LOG_LEVEL_ERROR, "checkpoint_find returned 0 Calling error_exit.\n");
error = SA_AIS_ERR_NOT_EXIST;
goto error_exit;
@@ -2188,7 +2188,7 @@
&checkpoint_list_head,
&req_exec_ckpt_sectionoverwrite->checkpoint_name,
req_exec_ckpt_sectionoverwrite->ckpt_id);
- if (checkpoint == 0) {
+ if (checkpoint == NULL) {
error = SA_AIS_ERR_NOT_EXIST;
goto error_exit;
}
@@ -2288,7 +2288,7 @@
&checkpoint_list_head,
&req_exec_ckpt_sectionread->checkpoint_name,
req_exec_ckpt_sectionread->ckpt_id);
- if (checkpoint == 0) {
+ if (checkpoint == NULL) {
error = SA_AIS_ERR_LIBRARY;
goto error_exit;
}
@@ -2566,11 +2566,15 @@
/*
* Make sure checkpoint is collocated and async update option
*/
+ if (checkpoint == NULL) {
+ error = SA_AIS_ERR_NOT_EXIST;
+ } else
if (((checkpoint->checkpoint_creation_attributes.creation_flags & SA_CKPT_CHECKPOINT_COLLOCATED) == 0) ||
(checkpoint->checkpoint_creation_attributes.creation_flags & (SA_CKPT_WR_ACTIVE_REPLICA | SA_CKPT_WR_ACTIVE_REPLICA_WEAK)) == 0) {
error = SA_AIS_ERR_BAD_OPERATION;
+ } else {
+ checkpoint->active_replica_set = 1;
}
- checkpoint->active_replica_set = 1;
res_lib_ckpt_activereplicaset.header.size = sizeof (struct res_lib_ckpt_activereplicaset);
res_lib_ckpt_activereplicaset.header.id = MESSAGE_RES_CKPT_ACTIVEREPLICASET;
res_lib_ckpt_activereplicaset.header.error = error;
@@ -2952,6 +2956,9 @@
&checkpoint_list_head,
&req_lib_ckpt_checkpointsynchronize->checkpoint_name,
req_lib_ckpt_checkpointsynchronize->ckpt_id);
+ if (checkpoint == NULL) {
+ res_lib_ckpt_checkpointsynchronize.header.error = SA_AIS_ERR_NOT_EXIST;
+ } else
if ((checkpoint->checkpoint_creation_attributes.creation_flags & (SA_CKPT_WR_ACTIVE_REPLICA | SA_CKPT_WR_ACTIVE_REPLICA_WEAK)) == 0) {
res_lib_ckpt_checkpointsynchronize.header.error = SA_AIS_ERR_BAD_OPERATION;
} else
@@ -2982,6 +2989,9 @@
&checkpoint_list_head,
&req_lib_ckpt_checkpointsynchronizeasync->checkpoint_name,
req_lib_ckpt_checkpointsynchronizeasync->ckpt_id);
+ if (checkpoint == NULL) {
+ res_lib_ckpt_checkpointsynchronizeasync.header.error = SA_AIS_ERR_NOT_EXIST;
+ } else
if ((checkpoint->checkpoint_creation_attributes.creation_flags & (SA_CKPT_WR_ACTIVE_REPLICA | SA_CKPT_WR_ACTIVE_REPLICA_WEAK)) == 0) {
res_lib_ckpt_checkpointsynchronizeasync.header.error = SA_AIS_ERR_BAD_OPERATION;
} else
@@ -3127,9 +3137,10 @@
res_lib_ckpt_sectioniterationinitialize.header.id = MESSAGE_RES_CKPT_SECTIONITERATIONINITIALIZE;
res_lib_ckpt_sectioniterationinitialize.header.error = error;
res_lib_ckpt_sectioniterationinitialize.iteration_handle = iteration_handle;
- res_lib_ckpt_sectioniterationinitialize.max_section_id_size =
- checkpoint->checkpoint_creation_attributes.max_section_id_size;
-
+ if (checkpoint != NULL) {
+ res_lib_ckpt_sectioniterationinitialize.max_section_id_size =
+ checkpoint->checkpoint_creation_attributes.max_section_id_size;
+ }
api->ipc_conn_send_response (
conn,
&res_lib_ckpt_sectioniterationinitialize,
diff -Naurd openais-0.91/services/Makefile openais-trunk/services/Makefile
--- openais-0.91/services/Makefile 2008-09-17 21:18:35.000000000 +0200
+++ openais-trunk/services/Makefile 2008-12-08 17:12:43.000000000 +0100
@@ -63,6 +63,8 @@
ifeq (${OPENAIS_COMPAT}, DARWIN)
+COROSYNC_BIN=$(PREFIX)/sbin/corosync
+
service_evs.lcrso: evs.o
$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader $(COROSYNC_BIN) -bind_at_load evs.o -o $@
diff -Naurd openais-0.91/test/ckptbench.c openais-trunk/test/ckptbench.c
--- openais-0.91/test/ckptbench.c 2008-07-21 10:21:13.000000000 +0200
+++ openais-trunk/test/ckptbench.c 2009-01-20 19:11:04.000000000 +0100
@@ -1,7 +1,7 @@
#define _BSD_SOURCE
/*
* Copyright (c) 2002-2004 MontaVista Software, Inc.
- * Copyright (c) 2006 Sun Microsystems, Inc.
+ * Copyright (c) 2006-2009 Red Hat, Inc.
*
* All rights reserved.
*
@@ -97,29 +97,29 @@
SaCkptCheckpointCreationAttributesT checkpointCreationAttributes = {
.creationFlags = SA_CKPT_WR_ALL_REPLICAS,
.checkpointSize = 250000,
- .retentionDuration = 0,
+ .retentionDuration = SA_TIME_END,
.maxSections = 5,
.maxSectionSize = 250000,
.maxSectionIdSize = 15
};
SaCkptSectionIdT sectionId1 = {
- 14,
+ 13,
(SaUint8T *) "section ID #1"
};
SaCkptSectionIdT sectionId2 = {
- 14,
+ 13,
(SaUint8T *) "section ID #2"
};
SaCkptSectionCreationAttributesT sectionCreationAttributes1 = {
§ionId1,
- 0xFFFFFFFF
+ SA_TIME_END
};
SaCkptSectionCreationAttributesT sectionCreationAttributes2 = {
§ionId2,
- 0xFFFFFFFF
+ SA_TIME_END
};
char readBuffer1[1025];
@@ -129,7 +129,7 @@
SaCkptIOVectorElementT ReadVectorElements[] = {
{
{
- 14,
+ 13,
(SaUint8T *) "section ID #1"
},
readBuffer1,
@@ -139,7 +139,7 @@
},
{
{
- 14,
+ 13,
(SaUint8T *) "section ID #2"
},
readBuffer2,
@@ -156,7 +156,7 @@
SaCkptIOVectorElementT WriteVectorElements[] = {
{
{
- 14,
+ 13,
(SaUint8T *) "section ID #1"
},
data, /*"written data #1, this should extend past end of old section data", */
@@ -167,7 +167,7 @@
#ifdef COMPILE_OUT
{
{
- 14,
+ 13,
(SaUint8T *) "section ID #2"
},
data, /*"written data #2, this should extend past end of old section data" */
Index: openais.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openais/devel/openais.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- openais.spec 15 Dec 2008 18:14:47 -0000 1.32
+++ openais.spec 27 Jan 2009 10:46:02 -0000 1.33
@@ -1,20 +1,20 @@
-%define alphatag svn1667
+%define alphatag svn1682
Name: openais
Summary: The openais Standards-Based Cluster Framework executive and APIs
Version: 0.91
-Release: 4%{?alphatag:.%{alphatag}}%{?dist}
+Release: 5%{?alphatag:.%{alphatag}}%{?dist}
License: BSD
Group: System Environment/Base
URL: http://developer.osdl.org/dev/openais/
Source0: http://www.osdl.org/downloads/openais-%{version}/openais-%{version}.tar.gz
-Patch0: openais-trunk-1667.diff
+Patch0: openais-trunk-1682.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
-Requires: corosync >= 0.92-5
-BuildRequires: corosync-devel >= 0.92-5
+Requires: corosync >= 0.92-6
+BuildRequires: corosync-devel >= 0.92-6
Conflicts: openais-devel <= 0.89
%description
@@ -116,6 +116,9 @@
%{_libdir}/openais/libSaMsg.so
%changelog
+* Tue Jan 27 2009 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.91-5.svn1682
+- Update to svn trunk at revision 1682 from upstream.
+
* Mon Dec 15 2008 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.91-4.svn1667
- No change rebuild against newer corosync.
--- openais-trunk-1667.diff DELETED ---
More information about the scm-commits
mailing list