LVM2 ./WHATS_NEW daemons/cmirrord/Makefile.in ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow at sourceware.org 2010-01-15 19:49:36
Modified files:
. : WHATS_NEW
daemons/cmirrord: Makefile.in cluster.c cluster.h common.h
Added files:
daemons/cmirrord: compat.c compat.h
Log message:
Make the intermachine communication structures architecture independant to allow for mixed architecture clusters.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1391&r2=1.1392
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/compat.c.diff?cvsroot=lvm2&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/compat.h.diff?cvsroot=lvm2&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/Makefile.in.diff?cvsroot=lvm2&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/cluster.c.diff?cvsroot=lvm2&r1=1.9&r2=1.10
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/cluster.h.diff?cvsroot=lvm2&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/cmirrord/common.h.diff?cvsroot=lvm2&r1=1.3&r2=1.4
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.59 - =================================== + Make cluster log communication structures architecture independant. Fix cluster log issues with in-memory bitmaps. Improve target type compatibility checking in _percent_run(). Add 'target_status_compatible' method to 'struct segtype_handler'.
/cvs/lvm2/LVM2/daemons/cmirrord/compat.c,v --> standard output revision 1.1
- renamed from daemons/cmirrord/compat.c +214 -0
214 lines not on this page · raw message
/cvs/lvm2/LVM2/daemons/cmirrord/compat.h,v --> standard output revision 1.1
- renamed from daemons/cmirrord/compat.h +25 -0
@@ -0,0 +1,25 @@ +/* + * Copyright (C) 2010 Red Hat, Inc. All rights reserved. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License v.2.1. + */ +#ifndef __COMPAT_DOT_H__ +#define __COMPAT_DOT_H__ + +/* + * The intermachine communication structure version are: + * 0: Unused + * 1: Never in the wild + * 2: RHEL 5.2 + * 3: RHEL 5.3 + * 4: RHEL 5.4, RHEL 5.5 + * 5: RHEL 6, Current Upstream Format + */ +#define CLOG_TFR_VERSION 5 + +int clog_request_to_network(struct clog_request *rq); +int clog_request_from_network(void *data, size_t data_len); + +#endif /* __COMPAT_DOT_H__ */
daemons/cmirrord/Makefile.in +1 -1
@@ -21,7 +21,7 @@ SACKPT_LIBS = @SACKPT_LIBS@ SACKPT_CFLAGS = @SACKPT_CFLAGS@ -SOURCES = clogd.c cluster.c functions.c link_mon.c local.c logging.c +SOURCES = clogd.c cluster.c compat.c functions.c link_mon.c local.c logging.c TARGETS = cmirrord
daemons/cmirrord/cluster.c +38 -28
184 lines not on this page · raw message
daemons/cmirrord/cluster.h +20 -1
@@ -15,6 +15,10 @@#include "libdevmapper.h" #include "dm-log-userspace.h" +#define DM_ULOG_RESPONSE 0x1000/* in last byte of 32-bit value */ +#define DM_ULOG_CHECKPOINT_READY 21 +#define DM_ULOG_MEMBER_JOIN 22 +/* * There is other information in addition to what can * be found in the dm_ulog_request structure that we
@@ -23,7 +27,22 @@* available. */ struct clog_request { -struct dm_list list; +/* +* If we don't use a union, the structure size will +* vary between 32-bit and 64-bit machines. So, we +* pack two 64-bit version numbers in there to force +* the size of the structure to be the same. +* +* The two version numbers also help us with endian +* issues. The first is always little endian, while +* the second is in native format of the sending +* machine. If the two are equal, there is no need +* to do endian conversions. +*/ +union { +uint64_t version[2 ];/* LE version and native version */ +struct dm_list list; + } u;/* * 'originator' is the machine from which the requests
daemons/cmirrord/common.h +8 -8
@@ -13,21 +13,21 @@#define __CLUSTER_LOG_COMMON_DOT_H__/* -#define EXIT_SUCCESS 0 -#define EXIT_FAILURE 1 -*/ - +* If there are problems when forking off to become a daemon, +* the child will exist with one of these codes. This allows +* the parent to know the reason for the failure and print it +* to the launching terminal. +* +* #define EXIT_SUCCESS 0 (from stdlib.h) +* #define EXIT_FAILURE 1 (from stdlib.h) +*/ #define EXIT_LOCKFILE 2 -#define EXIT_KERNEL_SOCKET 3/* Failed netlink socket create */ #define EXIT_KERNEL_BIND 4#define EXIT_KERNEL_SETSOCKOPT 5 -#define EXIT_CLUSTER_CKPT_INIT 6/* Failed to init checkpoint */ -#define EXIT_QUEUE_NOMEM 7 -#define DM_ULOG_REQUEST_SIZE 1024#endif /* __CLUSTER_LOG_COMMON_DOT_H__ */