[Ocfs2-commits] manish commits r1826 - in trunk: . fs/ocfs2
fs/ocfs2/cluster fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Jan 21 16:53:55 CST 2005
Author: manish
Date: 2005-01-21 16:53:53 -0600 (Fri, 21 Jan 2005)
New Revision: 1826
Modified:
trunk/Config.make.in
trunk/configure.in
trunk/fs/ocfs2/Makefile
trunk/fs/ocfs2/cluster/Makefile
trunk/fs/ocfs2/cluster/cl_compat.h
trunk/fs/ocfs2/cluster/util.c
trunk/fs/ocfs2/dlm/Makefile
trunk/fs/ocfs2/dlm/util.c
trunk/fs/ocfs2/ocfs_compat.h
trunk/fs/ocfs2/util.c
Log:
Remove HAVE_NPTL, invert logic for missing sock_create_lite, cleanup unused
build bits.
Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/Config.make.in 2005-01-21 22:53:53 UTC (rev 1826)
@@ -47,16 +47,15 @@
KERNELINC = $(KERNELDIR)/include
KERNELVER = @KERNELVER@
-KVER = @KVER@
-
MODULEDIR = @MODULEDIR@
MODVERSIONS = @MODVERSIONS@
GCCINC = @GCCINC@
+
+KVER =
endif
-HAVE_NPTL = @HAVE_NPTL@
-HAVE_SOCK_CREATE_LITE = @HAVE_SOCK_CREATE_LITE@
+MISSING_SOCK_CREATE_LITE = @MISSING_SOCK_CREATE_LITE@
COMPAT_SAFE_WRITE = @COMPAT_SAFE_WRITE@
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/configure.in 2005-01-21 22:53:53 UTC (rev 1826)
@@ -208,30 +208,6 @@
KERNELSRC=$kernelsrc
-AC_MSG_CHECKING([for Red Hat 2.4.x kernel])
-AC_EGREP_CPP(kernel_is_Red_Hat,
-[#include <linux/autoconf.h>
-#ifdef RED_HAT_LINUX_KERNEL
- kernel_is_Red_Hat
-#endif
-}], rhkernel=yes, rhkernel=no)
-AC_MSG_RESULT($rhkernel)
-
-ulkernel=no
-if test "x$rhkernel" = "xno"; then
- AC_MSG_CHECKING([for United Linux 2.4.x kernel])
- AC_EGREP_CPP(kernel_is_United_Linux,
-[#include <linux/autoconf.h>
-#ifdef CONFIG_UNITEDLINUX_KERNEL
- kernel_is_United_Linux
-#endif
-}], ulkernel=yes)
- AC_MSG_RESULT($ulkernel)
-fi
-
-KVER=
-AC_SUBST(KVER)
-
AC_MSG_CHECKING([whether to build aio])
if test "x$OCFS_AIO" = "xyes"; then
if test "x$KERNEL_26" = "xyes"; then
@@ -300,23 +276,22 @@
fi
AC_MSG_RESULT($have_NPTL)
-HAVE_NPTL=
-if test "x$have_NPTL" = "xyes"; then
- HAVE_NPTL=yes
+if test "x$have_NPTL" = "xno"; then
+ AC_MSG_ERROR([No NPTL support, please try a 2.6.x kernel])
fi
-AC_SUBST(HAVE_NPTL)
CPPFLAGS="$saved_CPPFLAGS"
CFLAGS="$saved_CFLAGS"
+MISSING_SOCK_CREATE_LITE=
AC_MSG_CHECKING([for sock_create_lite])
if grep -q "\<sock_create_lite(" "$KERNELINC/linux/net.h" ; then
- HAVE_SOCK_CREATE_LITE=yes
AC_MSG_RESULT(yes)
else
+ MISSING_SOCK_CREATE_LITE=yes
AC_MSG_RESULT(no)
fi
-AC_SUBST(HAVE_SOCK_CREATE_LITE)
+AC_SUBST(MISSING_SOCK_CREATE_LITE)
AC_MSG_CHECKING(for directory for kernel modules)
AC_ARG_WITH(moddir, [ --with-moddir=/path Path to where modules should be installed [[/lib/modules/<KVER>/fs]]], moddir="$withval", moddir="/lib/modules/$kversion/kernel/fs")
Modified: trunk/fs/ocfs2/Makefile
===================================================================
--- trunk/fs/ocfs2/Makefile 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/Makefile 2005-01-21 22:53:53 UTC (rev 1826)
@@ -22,10 +22,6 @@
MODULE_DEFINES += -DCATCH_BH_JBD_RACES
-ifdef HAVE_NPTL
-MODULE_DEFINES += -DHAVE_NPTL
-endif
-
ifdef OCFS_AIO
ifeq ($(KERNELRELEASE),)
MODULE_DEFINES += -DAIO_ENABLED
Modified: trunk/fs/ocfs2/cluster/Makefile
===================================================================
--- trunk/fs/ocfs2/cluster/Makefile 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/cluster/Makefile 2005-01-21 22:53:53 UTC (rev 1826)
@@ -12,14 +12,10 @@
endif
-ifdef HAVE_NPTL
-MODULE_DEFINES += -DHAVE_NPTL
+ifdef MISSING_SOCK_CREATE_LITE
+MODULE_DEFINES += -DMISSING_SOCK_CREATE_LITE
endif
-ifdef HAVE_SOCK_CREATE_LITE
-MODULE_DEFINES += -DHAVE_SOCK_CREATE_LITE
-endif
-
EXTRA_CFLAGS += $(MODULE_DEFINES)
ifeq ($(KERNELRELEASE),)
Modified: trunk/fs/ocfs2/cluster/cl_compat.h
===================================================================
--- trunk/fs/ocfs2/cluster/cl_compat.h 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/cluster/cl_compat.h 2005-01-21 22:53:53 UTC (rev 1826)
@@ -58,7 +58,7 @@
#define INIT_WORK(w, f, d) INIT_TQUEUE(w, f, d)
#define schedule_work(w) schedule_task(w)
-#ifdef HAVE_NPTL
+#if 1
static inline void dequeue_signal_lock(struct task_struct *task,
sigset_t *blocked, siginfo_t *info)
{
@@ -66,14 +66,6 @@
dequeue_signal(blocked, info);
spin_unlock_irq(&task->sighand->siglock);
}
-#else
-static inline void dequeue_signal_lock(struct task_struct *task,
- sigset_t *blocked, siginfo_t *info)
-{
- spin_lock_irq(&task->sigmask_lock);
- dequeue_signal(blocked, info);
- spin_unlock_irq(&task->sigmask_lock);
-}
#endif
#define kstatfs statfs
@@ -168,7 +160,7 @@
#endif /* LINUX_VERSION_CODE */
-#ifndef HAVE_SOCK_CREATE_LITE
+#ifdef MISSING_SOCK_CREATE_LITE
static inline int sock_create_lite(int family, int type, int protocol,
struct socket **res)
{
@@ -182,7 +174,7 @@
return ret;
}
-#endif /* HAVE_SOCK_CREATE_LITE */
+#endif /* NO_SOCK_CREATE_LITE */
#endif /* CLUSTER_DLM_COMPAT_H */
Modified: trunk/fs/ocfs2/cluster/util.c
===================================================================
--- trunk/fs/ocfs2/cluster/util.c 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/cluster/util.c 2005-01-21 22:53:53 UTC (rev 1826)
@@ -49,22 +49,13 @@
siginitsetinv(&tmpsig, mask);
sigprocmask(SIG_BLOCK, &tmpsig, oldsigs);
#else
-#ifdef HAVE_NPTL
spin_lock_irq (¤t->sighand->siglock);
if (oldsigs)
*oldsigs = current->blocked;
siginitsetinv (¤t->blocked, mask);
recalc_sigpending ();
spin_unlock_irq (¤t->sighand->siglock);
-#else
- spin_lock_irq (¤t->sigmask_lock);
- if (oldsigs)
- *oldsigs = current->blocked;
- siginitsetinv (¤t->blocked, mask);
- recalc_sigpending (current);
- spin_unlock_irq (¤t->sigmask_lock);
#endif
-#endif
}
void util_unblock_sigs(sigset_t newsig)
@@ -72,18 +63,11 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
sigprocmask(SIG_SETMASK, &newsig, NULL);
#else
-#ifdef HAVE_NPTL
spin_lock_irq (¤t->sighand->siglock);
current->blocked = newsig;
recalc_sigpending ();
spin_unlock_irq (¤t->sighand->siglock);
-#else
- spin_lock_irq (¤t->sigmask_lock);
- current->blocked = newsig;
- recalc_sigpending (current);
- spin_unlock_irq (¤t->sigmask_lock);
#endif
-#endif
}
/*
Modified: trunk/fs/ocfs2/dlm/Makefile
===================================================================
--- trunk/fs/ocfs2/dlm/Makefile 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/dlm/Makefile 2005-01-21 22:53:53 UTC (rev 1826)
@@ -17,10 +17,6 @@
MODULE_CFLAGS += -I$(CLUSTERINC)
-ifdef HAVE_NPTL
-MODULE_DEFINES += -DHAVE_NPTL
-endif
-
EXTRA_CFLAGS += $(MODULE_CFLAGS) $(MODULE_DEFINES)
obj-m := ocfs2_dlm.o
Modified: trunk/fs/ocfs2/dlm/util.c
===================================================================
--- trunk/fs/ocfs2/dlm/util.c 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/dlm/util.c 2005-01-21 22:53:53 UTC (rev 1826)
@@ -47,22 +47,13 @@
siginitsetinv(&tmpsig, mask);
sigprocmask(SIG_BLOCK, &tmpsig, oldsigs);
#else
-#ifdef HAVE_NPTL
spin_lock_irq (¤t->sighand->siglock);
if (oldsigs)
*oldsigs = current->blocked;
siginitsetinv (¤t->blocked, mask);
recalc_sigpending ();
spin_unlock_irq (¤t->sighand->siglock);
-#else
- spin_lock_irq (¤t->sigmask_lock);
- if (oldsigs)
- *oldsigs = current->blocked;
- siginitsetinv (¤t->blocked, mask);
- recalc_sigpending (current);
- spin_unlock_irq (¤t->sigmask_lock);
#endif
-#endif
}
void util_unblock_sigs(sigset_t newsig)
@@ -70,18 +61,11 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
sigprocmask(SIG_SETMASK, &newsig, NULL);
#else
-#ifdef HAVE_NPTL
spin_lock_irq (¤t->sighand->siglock);
current->blocked = newsig;
recalc_sigpending ();
spin_unlock_irq (¤t->sighand->siglock);
-#else
- spin_lock_irq (¤t->sigmask_lock);
- current->blocked = newsig;
- recalc_sigpending (current);
- spin_unlock_irq (¤t->sigmask_lock);
#endif
-#endif
}
/*
Modified: trunk/fs/ocfs2/ocfs_compat.h
===================================================================
--- trunk/fs/ocfs2/ocfs_compat.h 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/ocfs_compat.h 2005-01-21 22:53:53 UTC (rev 1826)
@@ -99,7 +99,7 @@
#define filemap_fdatawrite(mapping) \
filemap_fdatasync(mapping);
-#ifdef HAVE_NPTL
+#if 1
static inline void dequeue_signal_lock(struct task_struct *task,
sigset_t *blocked, siginfo_t *info)
{
@@ -121,28 +121,6 @@
}
return ret;
}
-#else
-static inline int ocfs_task_interruptible(void)
-{
- unsigned long flags;
- int ret = 0;
-
- if (signal_pending(current)) {
- spin_lock_irqsave(&(current->sigmask_lock), flags);
- if (sigismember(&(current->pending.signal), SIGKILL) ||
- sigismember(&(current->pending.signal), SIGINT))
- ret = 1;
- spin_unlock_irqrestore(&(current->sigmask_lock), flags);
- }
- return ret;
-}
-static inline void dequeue_signal_lock(struct task_struct *task,
- sigset_t *blocked, siginfo_t *info)
-{
- spin_lock_irq(&task->sigmask_lock);
- dequeue_signal(blocked, info);
- spin_unlock_irq(&task->sigmask_lock);
-}
#endif
static inline dev_t huge_decode_dev(u64 val)
Modified: trunk/fs/ocfs2/util.c
===================================================================
--- trunk/fs/ocfs2/util.c 2005-01-21 22:47:11 UTC (rev 1825)
+++ trunk/fs/ocfs2/util.c 2005-01-21 22:53:53 UTC (rev 1826)
@@ -48,22 +48,13 @@
siginitsetinv(&tmpsig, mask);
sigprocmask(SIG_BLOCK, &tmpsig, oldsigs);
#else
-#ifdef HAVE_NPTL
spin_lock_irq (¤t->sighand->siglock);
if (oldsigs)
*oldsigs = current->blocked;
siginitsetinv (¤t->blocked, mask);
recalc_sigpending ();
spin_unlock_irq (¤t->sighand->siglock);
-#else
- spin_lock_irq (¤t->sigmask_lock);
- if (oldsigs)
- *oldsigs = current->blocked;
- siginitsetinv (¤t->blocked, mask);
- recalc_sigpending (current);
- spin_unlock_irq (¤t->sigmask_lock);
#endif
-#endif
}
void ocfs_unblock_sigs(sigset_t newsig)
@@ -71,18 +62,11 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
sigprocmask(SIG_SETMASK, &newsig, NULL);
#else
-#ifdef HAVE_NPTL
spin_lock_irq (¤t->sighand->siglock);
current->blocked = newsig;
recalc_sigpending ();
spin_unlock_irq (¤t->sighand->siglock);
-#else
- spin_lock_irq (¤t->sigmask_lock);
- current->blocked = newsig;
- recalc_sigpending (current);
- spin_unlock_irq (¤t->sigmask_lock);
#endif
-#endif
}
/*
More information about the Ocfs2-commits
mailing list