* [gentoo-commits] gentoo-x86 commit in sys-cluster/pvfs2/files: 2.7.0-ctl_unnumbered.patch pvfs2-server-init.d-2.7.0 pvfs2-client-conf.d-2.7.0 pvfs2-client-init.d-2.7.0 2.7.0-kernel-rt.patch pvfs2-server-conf.d-2.7.0 2.7.0-verbose-checking.patch 2.7.0-gentoo-makefile.patch 2.7.0-kmem_cache.patch
@ 2008-03-06 23:05 Justin Bronder (jsbronder)
0 siblings, 0 replies; only message in thread
From: Justin Bronder (jsbronder) @ 2008-03-06 23:05 UTC (permalink / raw
To: gentoo-commits
jsbronder 08/03/06 23:05:45
Added: 2.7.0-ctl_unnumbered.patch
pvfs2-server-init.d-2.7.0 pvfs2-client-conf.d-2.7.0
pvfs2-client-init.d-2.7.0 2.7.0-kernel-rt.patch
pvfs2-server-conf.d-2.7.0
2.7.0-verbose-checking.patch
2.7.0-gentoo-makefile.patch 2.7.0-kmem_cache.patch
Log:
Fix bug #210923. Support kernel 2.6.24. Cleanup ebuild.
(Portage version: 2.1.4.4)
Revision Changes Path
1.1 sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-ctl_unnumbered.patch?rev=1.1&content-type=text/plain
Index: 2.7.0-ctl_unnumbered.patch
===================================================================
Index: src/kernel/linux-2.6/pvfs2-proc.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-proc.c,v
diff -u -r1.8 -r1.9
--- src/kernel/linux-2.6/pvfs2-proc.c 19 Aug 2007 18:20:28 -0000 1.8
+++ src/kernel/linux-2.6/pvfs2-proc.c 11 Jan 2008 15:20:16 -0000 1.9
@@ -261,10 +261,19 @@
static int min_debug[] = {0}, max_debug[] = {GOSSIP_MAX_DEBUG};
static int min_op_timeout_secs[] = {0}, max_op_timeout_secs[] = {INT_MAX};
+/*
+ * Modern kernels prefer to number the controls themselves.
+ */
+#ifdef CTL_UNNUMBERED
+#define UNNUMBERED_OR_VAL(x) CTL_UNNUMBERED
+#else
+#define UNNUMBERED_OR_VAL(x) x
+#endif
+
static ctl_table pvfs2_acache_table[] = {
/* controls acache timeout */
{
- .ctl_name = 1,
+ .ctl_name = UNNUMBERED_OR_VAL(1),
.procname = "timeout-msecs",
.maxlen = sizeof(int),
.mode = 0644,
@@ -273,7 +282,7 @@
},
/* controls acache hard limit */
{
- .ctl_name = 2,
+ .ctl_name = UNNUMBERED_OR_VAL(2),
.procname = "hard-limit",
.maxlen = sizeof(int),
.mode = 0644,
@@ -282,7 +291,7 @@
},
/* controls acache soft limit */
{
- .ctl_name = 3,
+ .ctl_name = UNNUMBERED_OR_VAL(3),
.procname = "soft-limit",
.maxlen = sizeof(int),
.mode = 0644,
@@ -291,7 +300,7 @@
},
/* controls acache reclaim percentage */
{
- .ctl_name = 4,
+ .ctl_name = UNNUMBERED_OR_VAL(4),
.procname = "reclaim-percentage",
.maxlen = sizeof(int),
.mode = 0644,
@@ -303,7 +312,7 @@
static ctl_table pvfs2_ncache_table[] = {
/* controls ncache timeout */
{
- .ctl_name = 1,
+ .ctl_name = UNNUMBERED_OR_VAL(1),
.procname = "timeout-msecs",
.maxlen = sizeof(int),
.mode = 0644,
@@ -312,7 +321,7 @@
},
/* controls ncache hard limit */
{
- .ctl_name = 2,
+ .ctl_name = UNNUMBERED_OR_VAL(2),
.procname = "hard-limit",
.maxlen = sizeof(int),
.mode = 0644,
@@ -321,7 +330,7 @@
},
/* controls ncache soft limit */
{
- .ctl_name = 3,
+ .ctl_name = UNNUMBERED_OR_VAL(3),
.procname = "soft-limit",
.maxlen = sizeof(int),
.mode = 0644,
@@ -330,7 +339,7 @@
},
/* controls ncache reclaim percentage */
{
- .ctl_name = 4,
+ .ctl_name = UNNUMBERED_OR_VAL(4),
.procname = "reclaim-percentage",
.maxlen = sizeof(int),
.mode = 0644,
@@ -343,15 +352,15 @@
static int ncache_perf_count = PVFS2_PERF_COUNT_REQUEST_NCACHE;
static ctl_table pvfs2_pc_table[] = {
{
- .ctl_name = 1,
+ .ctl_name = UNNUMBERED_OR_VAL(1),
.procname = "acache",
.maxlen = 4096,
.mode = 0444,
.proc_handler = pvfs2_pc_proc_handler,
.extra1 = &acache_perf_count,
},
{
- .ctl_name = 2,
+ .ctl_name = UNNUMBERED_OR_VAL(2),
.procname = "ncache",
.maxlen = 4096,
.mode = 0444,
@@ -366,44 +375,44 @@
static ctl_table pvfs2_stats_table[] = {
/* shows number of hits in cache */
{
- .ctl_name = 1,
+ .ctl_name = UNNUMBERED_OR_VAL(1),
.procname = "hits",
.data = &g_pvfs2_stats.cache_hits,
.maxlen = sizeof(unsigned long),
.mode = 0444,
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = 2,
+ .ctl_name = UNNUMBERED_OR_VAL(2),
.procname = "misses",
.data = &g_pvfs2_stats.cache_misses,
.maxlen = sizeof(unsigned long),
.mode = 0444,
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = 3,
+ .ctl_name = UNNUMBERED_OR_VAL(3),
.procname = "reads",
.data = &g_pvfs2_stats.reads,
.maxlen = sizeof(unsigned long),
.mode = 0444,
.proc_handler = &proc_dointvec,
},
{
- .ctl_name = 4,
+ .ctl_name = UNNUMBERED_OR_VAL(4),
.procname = "writes",
.data = &g_pvfs2_stats.writes,
.maxlen = sizeof(unsigned long),
.mode = 0444,
.proc_handler = &proc_dointvec,
},
- {.ctl_name = 0},
+ {0}
};
static ctl_table pvfs2_table[] = {
/* controls debugging level */
{
- .ctl_name = 1,
+ .ctl_name = UNNUMBERED_OR_VAL(1),
.procname = "debug",
.data = &gossip_debug_mask,
.maxlen = sizeof(int),
@@ -415,7 +424,7 @@
},
/* operation timeout */
{
- .ctl_name = 2,
+ .ctl_name = UNNUMBERED_OR_VAL(2),
.procname = "op-timeout-secs",
.data = &op_timeout_secs,
.maxlen = sizeof(int),
@@ -427,7 +436,7 @@
},
/* time interval for client side performance counters */
{
- .ctl_name = 3,
+ .ctl_name = UNNUMBERED_OR_VAL(3),
.procname = "perf-time-interval-secs",
.maxlen = sizeof(int),
.mode = 0644,
@@ -436,7 +445,7 @@
},
/* time interval for client side performance counters */
{
- .ctl_name = 4,
+ .ctl_name = UNNUMBERED_OR_VAL(4),
.procname = "perf-history-size",
.maxlen = sizeof(int),
.mode = 0644,
@@ -445,7 +454,7 @@
},
/* reset performance counters */
{
- .ctl_name = 5,
+ .ctl_name = UNNUMBERED_OR_VAL(5),
.procname = "perf-counter-reset",
.maxlen = sizeof(int),
.mode = 0644,
@@ -454,30 +463,30 @@
},
/* subdir for acache control */
{
- .ctl_name = 6,
+ .ctl_name = UNNUMBERED_OR_VAL(6),
.procname = "acache",
.maxlen = 0,
.mode = 0555,
.child = pvfs2_acache_table
},
{
- .ctl_name = 7,
+ .ctl_name = UNNUMBERED_OR_VAL(7),
.procname = "perf-counters",
.maxlen = 0,
.mode = 0555,
.child = pvfs2_pc_table
},
/* subdir for ncache control */
{
- .ctl_name = 8,
+ .ctl_name = UNNUMBERED_OR_VAL(8),
.procname = "ncache",
.maxlen = 0,
.mode = 0555,
.child = pvfs2_ncache_table
},
/* statistics maintained by the kernel module (output only below this) */
{
- .ctl_name = 9,
+ .ctl_name = UNNUMBERED_OR_VAL(9),
.procname = "stats",
.maxlen = 0,
.mode = 0555,
@@ -487,7 +496,7 @@
};
static ctl_table fs_table[] = {
{
- .ctl_name = 1,
+ .ctl_name = UNNUMBERED_OR_VAL(1),
.procname = "pvfs2",
.mode = 0555,
.child = pvfs2_table
1.1 sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0?rev=1.1&content-type=text/plain
Index: pvfs2-server-init.d-2.7.0
===================================================================
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server-init.d-2.7.0,v 1.1 2008/03/06 23:05:44 jsbronder Exp $
depend() {
after localmount netmount nfsmount dns
use net
}
checkconfig() {
local piddir=$(dirname "${PVFS2_PIDFILE}")
if [ ! -d "${piddir}" ]; then
mkdir -p "${piddir}" || return 1
fi
# verify presence of server binary
if ! [ -x "${PVFS2_SERVER}" ]; then
eerror "Could not find executable ${PVFS2_SERVER}"
return 1
fi
if ! [ -r "${PVFS2_FS_CONF}" ]; then
eerror "Could not read ${PVFS2_FS_CONF}"
return 1
fi
}
start() {
local rc
checkconfig || return 1
ebegin "Starting PVFS2 server"
# Optionally force pvfs2-server to generate the pvfs2 filesystem.
if [[ ${PVFS2_AUTO_MKFS} -ne 0 && \
! -f $(grep StorageSpace ${PVFS2_FS_CONF} | cut -d' ' -f 2)/collections.db ]]; then
ewarn "Initializing the file system storage with --mkfs"
"${PVFS2_SERVER}" --mkfs "${PVFS2_FS_CONF}"
rc=$?
fi
if [[ ${rc} -eq 0 ]]; then
start-stop-daemon -b --start --quiet \
--pidfile "${PVFS2_PIDFILE}" \
--exec "${PVFS2_SERVER}" \
-- -p "${PVFS2_PIDFILE}" ${PVFS2_OPTIONS} "${PVFS2_FS_CONF}"
rc=$?
fi
eend ${rc}
}
stop() {
checkconfig || return 1
ebegin "Stopping PVFS2 server"
start-stop-daemon --stop --quiet --pidfile "${PVFS2_PIDFILE}"
eend
}
restart() {
svc_stop
sleep 2
svc_start
}
1.1 sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.0
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.0?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-conf.d-2.7.0?rev=1.1&content-type=text/plain
Index: pvfs2-client-conf.d-2.7.0
===================================================================
# Extra arguments to supply to the pvfs2-client daemon
#PVFS2_CLIENT_ARGS="-L /var/log/pvfs2-client.log"
# Location of the pvfs2-client binaries. Defaults are shown
PVFS2_CLIENT="/usr/sbin/pvfs2-client"
PVFS2_CLIENT_CORE="/usr/sbin/pvfs2-client-core"
# Location to store pid
PVFS2_CLIENT_PIDFILE="/var/run/pvfs2-client.pid"
# List of server:mountpoint to automatically mount when the
# init script is run. If some other mechanism is used to do
# the mounting, then this can be left commented out.
# 3334 is the default port for pvfs2.
# <host>:<port>,<mount_point>
#PVFS2_MOUNTS="servera.tld:3334,/pvfs serverb.tld:3334,/other/pvfs"
1.1 sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0?rev=1.1&content-type=text/plain
Index: pvfs2-client-init.d-2.7.0
===================================================================
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-init.d-2.7.0,v 1.1 2008/03/06 23:05:44 jsbronder Exp $
depend() {
need net
need localmount
before pbs_mom
after pvfs2-server
}
checkconfig() {
if [ ! -x "${PVFS2_CLIENT}" -o ! -x "${PVFS2_CLIENT_CORE}" ]; then
eend 1 "pvfs-2 was not correctly installed."
return 1
fi
local piddir=$(dirname ${PVFS2_CLIENT_PIDFILE})
if [ ! -d "${piddir}" ]; then
ewarn "Creating ${piddir}"
mkdir -p ${piddir} || return 1
fi
}
start() {
local rc=0
local server_mp server mp
checkconfig || return 1
ebegin "Starting pvfs2-client"
if ! grep -qs pvfs2 /proc/filesystems; then
eerror "Kernel does not support pvfs2 filesystems"
return 1
fi
# Don't fork the client so we can get the pid with s-s-d.
if ! start-stop-daemon --start -m -b --quiet \
--pidfile ${PVFS2_CLIENT_PIDFILE} \
--exec "${PVFS2_CLIENT}" \
-- -f -p ${PVFS2_CLIENT_CORE} ${PVFS2_CLIENT_ARGS}; then
rc=1
elif [ -n "${PVFS2_MOUNTS}" ]; then
for server_mp in ${PVFS2_MOUNTS}; do
mount -t pvfs2 \
tcp://$(echo ${server_mp} | cut -d',' -f1)/pvfs2-fs \
$(echo ${server_mp} | cut -d',' -f2)
rc=$?
[[ ${rc} -ne 0 ]] && break
done
[[ ${rc} -ne 0 ]] && start-stop-daemon --stop -p ${PVFS2_CLIENT_PIDFILE}
fi
eend ${rc}
}
stop() {
local rc=0
local server_mp
checkconfig || return 1
ebegin "Stopping pvfs2-client"
if [ -n "${PVFS2_MOUNTS}" ]; then
for server_mp in ${PVFS2_MOUNTS}; do
umount -f $(echo ${server_mp} | cut -d',' -f2)
rc=$?
[[ ${rc} -ne 0 ]] && break
done
fi
if [[ ${rc} -eq 0 ]]; then
start-stop-daemon --stop -p ${PVFS2_CLIENT_PIDFILE}
rc=$?
fi
eend ${rc}
}
1.1 sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-kernel-rt.patch?rev=1.1&content-type=text/plain
Index: 2.7.0-kernel-rt.patch
===================================================================
Index: pvfs2-config.h.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/pvfs2-config.h.in,v
diff -u -N -r1.111 -r1.112
--- pvfs2-config.h.in 5 Nov 2007 21:07:54 -0000 1.111
+++ pvfs2-config.h.in 7 Dec 2007 23:05:56 -0000 1.112
@@ -198,6 +198,9 @@
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
+/* Define if kernel defines mapping_nrpages macro -- defined by RT linux */
+#undef HAVE_MAPPING_NRPAGES_MACRO
+
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -258,6 +261,10 @@
/* Define if kernel has register_ioctl32_conversion */
#undef HAVE_REGISTER_IOCTL32_CONVERSION
+/* Define if kernel address_space struct has a spin_lock for private data
+ instead of rw_lock -- used by RT linux */
+#undef HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT
+
/* Define to 1 if you have the <SDL/SDL_ttf.h> header file. */
#undef HAVE_SDL_SDL_TTF_H
@@ -273,6 +280,9 @@
/* Define if SLAB_KERNEL is defined in kernel */
#undef HAVE_SLAB_KERNEL
+/* Define if kernel address_space struct has a spin_lock instead of rw_lock */
+#undef HAVE_SPIN_LOCK_ADDR_SPACE_STRUCT
+
/* Define if struct super_operations in kernel has statfs_lite callback */
#undef HAVE_STATFS_LITE_SUPER_OPERATIONS
Index: maint/config/kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2/maint/config/kernel.m4,v
diff -u -N -r1.46 -r1.47
--- maint/config/kernel.m4 6 Nov 2007 16:29:52 -0000 1.46
+++ maint/config/kernel.m4 7 Dec 2007 23:05:56 -0000 1.47
@@ -849,5 +849,44 @@
AC_MSG_RESULT(no)
)
+ AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ ], [
+ struct address_space as;
+ spin_lock(&as.page_lock);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SPIN_LOCK_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock instead of rw_lock]),
+ AC_MSG_RESULT(no)
+ )
+
+ AC_MSG_CHECKING(if kernel address_space struct has a priv_lock field - from RT linux)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ ], [
+ struct address_space as;
+ spin_lock(&as.priv_lock);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock for private data instead of rw_lock -- used by RT linux]),
+ AC_MSG_RESULT(no)
+ )
+
+ AC_MSG_CHECKING(if kernel defines mapping_nrpages macro - from RT linux)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/fs.h>
+ ], [
+ struct address_space idata;
+ int i = mapping_nrpages(&idata);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MAPPING_NRPAGES_MACRO, 1, [Define if kernel defines mapping_nrpages macro -- defined by RT linux]),
+ AC_MSG_RESULT(no)
+ )
+
CFLAGS=$oldcflags
])
1.1 sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.0
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.0?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server-conf.d-2.7.0?rev=1.1&content-type=text/plain
Index: pvfs2-server-conf.d-2.7.0
===================================================================
# pvfs2 only uses one config file as of 2.7.0. This is the path
# to that config file.
PVFS2_FS_CONF="/etc/pvfs/pvfs2-fs.conf"
# your server binary, default is shown.
PVFS2_SERVER=/usr/sbin/pvfs2-server
# the server will record its PID in this file using the -p argument
PVFS2_PIDFILE=/var/run/pvfs2.pid
#Additional options
PVFS2_OPTIONS=""
# Automatically call pvfs2-server with --mkfs if the first call to start
# the daemon fails. Off by default as this does mess with the local
# filesystem to prepare the directory for pvfs2-server
PVFS2_AUTO_MKFS=0
1.1 sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-verbose-checking.patch?rev=1.1&content-type=text/plain
Index: 2.7.0-verbose-checking.patch
===================================================================
Index: maint/config/kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2/maint/config/kernel.m4,v
diff -u -N -r1.48 -r1.49
--- maint/config/kernel.m4 11 Jan 2008 15:00:08 -0000 1.48
+++ maint/config/kernel.m4 11 Jan 2008 15:02:14 -0000 1.49
@@ -849,7 +849,7 @@
AC_MSG_RESULT(no)
)
- AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field)
+ AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field named page_lock)
AC_TRY_COMPILE([
#define __KERNEL__
#include <linux/fs.h>
1.1 sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-gentoo-makefile.patch?rev=1.1&content-type=text/plain
Index: 2.7.0-gentoo-makefile.patch
===================================================================
diff -urN pvfs-2.7.0/Makefile.in pvfs-2.7.0_patched/Makefile.in
--- pvfs-2.7.0/Makefile.in 2008-02-28 10:27:37.000000000 -0500
+++ pvfs-2.7.0_patched/Makefile.in 2008-02-28 10:27:35.000000000 -0500
@@ -52,10 +52,14 @@
# define a few generic variables that we need to use
DESTDIR =
srcdir = @srcdir@
-prefix = $(DESTDIR)@prefix@
+prefix = @prefix@
datarootdir = $(DESTDIR)@datarootdir@
mandir = $(DESTDIR)@mandir@
-exec_prefix = $(DESTDIR)@exec_prefix@
+exec_prefix = @exec_prefix@
+sbindir = $(DESTDIR)@sbindir@
+bindir = $(DESTDIR)@bindir@
+libdir = $(DESTDIR)@libdir@
+includedir = $(DESTDIR)@includedir@
VPATH = $(srcdir)
SHELL = @SHELL@
@@ -63,6 +67,7 @@
# TODO: should probably check for bison and flex in configure
BISON = bison
FLEX = flex
+LN_S = ln -s
BUILD_BMI_TCP = @BUILD_BMI_TCP@
BUILD_GM = @BUILD_GM@
BUILD_MX = @BUILD_MX@
@@ -162,6 +167,9 @@
REDHAT_RELEASE = @REDHAT_RELEASE@
NPTL_WORKAROUND = @NPTL_WORKAROUND@
STRICT_CFLAGS = @STRICT_CFLAGS@
+SO_FULL = 2.0.0
+SO_MAJOR = 2
+
# for Solaris:
# LIBS += -lsocket -lnsl
@@ -435,8 +443,10 @@
LIBRARIES :=
LIBRARIES_THREADED :=
ifeq ($(build_shared),yes)
-LIBRARIES_SHARED = lib/libpvfs2.so
+LIBRARIES_SHARED = lib/libpvfs2.so.$(SO_FULL)
LIBRARIES += $(LIBRARIES_SHARED)
+LIBRARIES_THREADED_SHARED = lib/libpvfs2-threaded.so.$(SO_FULL)
+LIBRARIES_THREADED += $(LIBRARIES_THREADED_SHARED)
endif
ifeq ($(build_static),yes)
LIBRARIES_STATIC = lib/libpvfs2.a
@@ -627,16 +637,16 @@
$(E)ar rcs $@ $(LIBTHREADEDOBJS)
# rule for building the pvfs2 library
-lib/libpvfs2.so: $(LIBPICOBJS)
+lib/libpvfs2.so.$(SO_FULL): $(LIBPICOBJS)
$(Q) " LDSO $@"
$(E)$(INSTALL) -d lib
- $(E)$(LDSHARED) -o $@ $(LIBPICOBJS)
+ $(E)$(LDSHARED) -Wl,-soname,libpvfs2.so -o $@ $(LIBPICOBJS)
# rule for building the pvfs2 _multithreaded_ library
-lib/libpvfs2-threaded.so: $(LIBTHREADEDPICOBJS)
+lib/libpvfs2-threaded.so.$(SO_FULL): $(LIBTHREADEDPICOBJS)
$(Q) " LDSO $@"
$(E)$(INSTALL) -d lib
- $(E)$(LDSHARED) -o $@ $(LIBTHREADEDPICOBJS)
+ $(E)$(LDSHARED) -Wl,-soname,libpvfs2-threaded.so -o $@ $(LIBTHREADEDPICOBJS)
# rule for building the pvfs2 server library
lib/libpvfs2-server.a: $(SERVEROBJS)
@@ -713,7 +723,7 @@
# all applications depend on the pvfs2 library
$(ADMINTOOLS): %: %.o $(LIBRARIES)
-$(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES) lib/libpvfs2-server.a
+$(ADMINTOOLS_SERVER): %: %.o $(LIBRARIES)
$(KERNAPPS): %: %.o $(LIBRARIES)
$(KERNAPPSTHR): %: %.o $(LIBRARIES_THREADED)
@@ -769,7 +779,7 @@
$(E)rm -f $(LIBOBJS) $(LIBTHREADEDOBJS) $(SERVEROBJS) $(MISCOBJS) \
$(LIBRARIES) $(LIBRARIES_THREADED) $(DEPENDS) $(SERVER) \
$(ADMINOBJS) $(ADMINOBJS_SERVER) $(ADMINTOOLS)\
- $(ADMINTOOLS_SERVER) lib/libpvfs2-server.a\
+ $(ADMINTOOLS_SERVER) \
$(KERNAPPOBJS) $(KERNAPPS) $(KERNAPPSTHR) \
$(VISS) $(VISMISCOBJS) $(VISOBJS) $(VISDEPENDS)\
$(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS) \
@@ -883,43 +893,48 @@
install -m 644 $(srcdir)/doc/man/*.5 $(mandir)/man5
install:: all install_doc
- install -d $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-request.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-debug.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-sysint.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-types.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-util.h $(prefix)/include
- install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(prefix)/include
-
- install -d $(prefix)/lib
- install -m 755 $(LIBRARIES) $(prefix)/lib
+ install -d $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-request.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-debug.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-sysint.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-mgmt.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-types.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-util.h $(includedir)
+ install -m 644 $(srcdir)/include/pvfs2-encode-stubs.h $(includedir)
+
+ install -d $(libdir)
+ install -m 755 $(LIBRARIES) $(libdir)
+ install -m 755 $(LIBRARIES_THREADED) $(libdir)
+ $(LN_S) libpvfs2-threaded.so.$(SO_FULL) $(libdir)/libpvfs2-threaded.so.$(SO_MAJOR)
+ $(LN_S) libpvfs2-threaded.so.$(SO_FULL) $(libdir)/libpvfs2-threaded.so
+ $(LN_S) libpvfs2.so.$(SO_FULL) $(libdir)/libpvfs2.so.$(SO_MAJOR)
+ $(LN_S) libpvfs2.so.$(SO_FULL) $(libdir)/libpvfs2.so
ifdef TARGET_OS_DARWIN
# TOC needs to be regenerated in libs after they get moved
ranlib $(patsubst %,$(prefix)/%,$(LIBRARIES))
endif
- install -d $(prefix)/bin
- install -m 755 $(ADMINTOOLS) $(prefix)/bin
- install -m 755 src/apps/admin/pvfs2-config $(prefix)/bin
+ install -d $(bindir)
+ install -m 755 $(ADMINTOOLS) $(bindir)
+ install -m 755 src/apps/admin/pvfs2-config $(bindir)
@# if we ever auto-generate genconfig, remove the $(srcdir)
- install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(prefix)/bin
- install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert $(prefix)/bin
+ install -m 755 $(srcdir)/src/apps/admin/pvfs2-genconfig $(bindir)
+ install -m 755 $(srcdir)/src/apps/admin/pvfs2-config-convert $(bindir)
ifdef BUILD_KARMA
- install -m 755 $(KARMA) $(prefix)/bin
+ install -m 755 $(KARMA) $(bindir)
endif
- install -d $(prefix)/sbin
+ install -d $(sbindir)
ifdef BUILD_SERVER
- install -m 755 $(ADMINTOOLS_SERVER) $(prefix)/bin
+ install -m 755 $(ADMINTOOLS_SERVER) $(bindir)
ifeq ($(NPTL_WORKAROUND),)
- install -m 755 $(SERVER) $(prefix)/sbin
+ install -m 755 $(SERVER) $(sbindir)
else
- install -m 755 $(srcdir)/$(SERVER_STUB) $(prefix)/sbin/pvfs2-server
- install -m 755 $(SERVER) $(prefix)/sbin/pvfs2-server.bin
+ install -m 755 $(srcdir)/$(SERVER_STUB) $(sbindir)/pvfs2-server
+ install -m 755 $(SERVER) $(sbindir)/pvfs2-server.bin
endif
endif
@@ -939,9 +954,12 @@
install -m 755 src/kernel/linux-2.6/pvfs2.ko $(KMOD_DIR)
.PHONY: kmod_install
-kmod_install: kmod kernapps just_kmod_install
- install -d $(prefix)/sbin
- install -m 755 $(KERNAPPS) $(prefix)/sbin
+kmod_install: kmod kernapps_install just_kmod_install
+
+.PHONY: kernapps_install
+kernapps_install: kernapps
+ install -d $(sbindir)
+ install -m 755 $(KERNAPPS) $(sbindir)
endif
ifneq (,$(LINUX24_KERNEL_SRC))
@@ -960,12 +978,15 @@
install -m 755 src/kernel/linux-2.4/pvfs2.o $(KMOD_DIR)
.PHONY: kmod24_install
-kmod24_install: kmod24 kernapps just_kmod24_install
- install -d $(prefix)/sbin
- install -m 755 $(KERNAPPS) $(prefix)/sbin
- install -m 755 src/apps/kernel/linux/mount.pvfs2 $(prefix)/sbin
+kmod24_install: kmod24 kernapps_install just_kmod24_install
+
+.PHONY: kernapps_install
+kernapps_install: kernapps
+ install -d $(sbindir)
+ install -m 755 $(KERNAPPS) $(sbindir)
+ install -m 755 src/apps/kernel/linux/mount.pvfs2 $(sbindir)
@echo ""
@echo "For improved linux-2.4 support,"
- @echo "install $(prefix)/sbin/mount.pvfs2 to /sbin/mount.pvfs2"
+ @echo "install $(sbindir)/mount.pvfs2 to /sbin/mount.pvfs2"
@echo ""
endif
1.1 sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.7.0-kmem_cache.patch?rev=1.1&content-type=text/plain
Index: 2.7.0-kmem_cache.patch
===================================================================
Index: pvfs2-config.h.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/pvfs2-config.h.in,v
diff -u -r1.113 -r1.114
--- pvfs2-config.h.in 11 Jan 2008 15:00:08 -0000 1.113
+++ pvfs2-config.h.in 11 Jan 2008 20:30:17 -0000 1.114
@@ -159,6 +159,10 @@
/* Define if kernel lacks device classes */
#undef HAVE_KERNEL_DEVICE_CLASSES
+/* Define if kernel kmem_cache_create constructor has new-style two-parameter
+ form */
+#undef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
+
/* Define if kernel kmem_cache_create has destructor param */
#undef HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM
Index: maint/config/kernel.m4
===================================================================
RCS file: /projects/cvsroot/pvfs2/maint/config/kernel.m4,v
diff -u -r1.50 -r1.51
--- maint/config/kernel.m4 11 Jan 2008 20:07:20 -0000 1.50
+++ maint/config/kernel.m4 11 Jan 2008 20:30:16 -0000 1.51
@@ -126,6 +126,7 @@
AC_MSG_CHECKING(for struct kmem_cache in kernel)
AC_TRY_COMPILE([
#define __KERNEL__
+ #include <linux/kernel.h>
#include <linux/slab.h>
int foo(struct kmem_cache *s)
@@ -866,6 +865,32 @@
AC_MSG_RESULT(no)
)
+ dnl 2.6.24 changed the constructor parameter signature of
+ dnl kmem_cache_create. Check for this newer two-param style and
+ dnl if not, assume it is old. Note we can get away with just
+ dnl struct kmem_cache (and not kmem_cache_t) as that change happened
+ dnl in older kernels. If they don't match, gcc complains about
+ dnl passing argument ... from incompatible pointer type, hence the
+ dnl need for the -Werror.
+ tmp_cflags=$CFLAGS
+ CFLAGS="$CFLAGS -Werror"
+ AC_MSG_CHECKING(for two-param kmem_cache_create constructor)
+ AC_TRY_COMPILE([
+ #define __KERNEL__
+ #include <linux/kernel.h>
+ #include <linux/slab.h>
+ void ctor(struct kmem_cache *cachep, void *req)
+ {
+ }
+ ], [
+ kmem_cache_create("config-test", 0, 0, 0, ctor);
+ ],
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM, 1, [Define if kernel kmem_cache_create constructor has new-style two-parameter form]),
+ AC_MSG_RESULT(no)
+ )
+ CFLAGS=$tmp_cflags
+
AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field named page_lock)
AC_TRY_COMPILE([
#define __KERNEL__
Index: src/kernel/linux-2.6/pvfs2-cache.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-cache.c,v
diff -u -r1.44 -r1.45
--- src/kernel/linux-2.6/pvfs2-cache.c 4 Nov 2007 01:38:57 -0000 1.44
+++ src/kernel/linux-2.6/pvfs2-cache.c 11 Jan 2008 20:30:17 -0000 1.45
@@ -202,10 +202,17 @@
}
}
+
static void dev_req_cache_ctor(
+#ifdef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
+ struct kmem_cache *cachep,
+ void *req
+#else
void *req,
pvfs2_kmem_cache_t * cachep,
- unsigned long flags)
+ unsigned long flags
+#endif
+)
{
memset(req, 0, sizeof(MAX_ALIGNED_DEV_REQ_DOWNSIZE));
}
@@ -264,11 +271,17 @@
}
static void pvfs2_inode_cache_ctor(
- void *new_pvfs2_inode,
+#ifdef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
+ struct kmem_cache *cachep,
+ void *req
+#else
+ void *req,
pvfs2_kmem_cache_t * cachep,
- unsigned long flags)
+ unsigned long flags
+#endif
+)
{
- pvfs2_inode_t *pvfs2_inode = (pvfs2_inode_t *)new_pvfs2_inode;
+ pvfs2_inode_t *pvfs2_inode = req;
memset(pvfs2_inode, 0, sizeof(pvfs2_inode_t));
ClearInitFlag(pvfs2_inode);
@@ -382,9 +395,15 @@
#ifdef HAVE_AIO_VFS_SUPPORT
static void kiocb_ctor(
+#ifdef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM
+ struct kmem_cache *cachep,
+ void *req
+#else
void *req,
pvfs2_kmem_cache_t * cachep,
- unsigned long flags)
+ unsigned long flags
+#endif
+)
{
memset(req, 0, sizeof(pvfs2_kiocb));
}
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-06 23:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-06 23:05 [gentoo-commits] gentoo-x86 commit in sys-cluster/pvfs2/files: 2.7.0-ctl_unnumbered.patch pvfs2-server-init.d-2.7.0 pvfs2-client-conf.d-2.7.0 pvfs2-client-init.d-2.7.0 2.7.0-kernel-rt.patch pvfs2-server-conf.d-2.7.0 2.7.0-verbose-checking.patch 2.7.0-gentoo-makefile.patch 2.7.0-kmem_cache.patch Justin Bronder (jsbronder)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox