[Ocfs2-commits] jlbec commits r968 - in trunk/src: . inc
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Jun 1 21:55:04 CDT 2004
Author: jlbec
Date: 2004-06-01 20:55:02 -0500 (Tue, 01 Jun 2004)
New Revision: 968
Added:
trunk/src/inc/ocfs_compat.h
Modified:
trunk/src/Makefile
trunk/src/alloc.c
trunk/src/bitmap.c
trunk/src/dcache.c
trunk/src/dir.c
trunk/src/dlm.c
trunk/src/extmap.c
trunk/src/file.c
trunk/src/hash.c
trunk/src/heartbeat.c
trunk/src/inc/ocfs.h
trunk/src/inode.c
trunk/src/io.c
trunk/src/ioctl.c
trunk/src/journal.c
trunk/src/lockres.c
trunk/src/namei.c
trunk/src/nm.c
trunk/src/proc.c
trunk/src/super.c
trunk/src/symlink.c
trunk/src/sysfile.c
trunk/src/util.c
trunk/src/ver.c
trunk/src/volcfg.c
trunk/src/vote.c
Log:
o Removed 21 #includes from ocfs.h
Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/Makefile 2004-06-02 01:55:02 UTC (rev 968)
@@ -148,6 +148,7 @@
HFILES = \
inc/ocfs.h \
inc/ocfs_log.h \
+ inc/ocfs_compat.h \
inc/ocfs_journal.h \
inc/io.h \
inc/proto.h
@@ -165,6 +166,9 @@
ifndef KERNEL_26
# Building for a 2.4.x kernel
+# Make dependancies work
+$(OBJS): $(HFILES)
+
ifneq ($(OCFS_PROCESSOR),x86_64)
WARNINGS += -Wmissing-prototypes -Wmissing-declarations
endif
Modified: trunk/src/alloc.c
===================================================================
--- trunk/src/alloc.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/alloc.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,15 +24,14 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
-#ifdef __KERNEL__
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
#include "inc/ocfs_journal.h"
-#else
-#include <debugocfs.h>
-#endif
#ifndef USERSPACE_TOOL
Modified: trunk/src/bitmap.c
===================================================================
--- trunk/src/bitmap.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/bitmap.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,16 +24,14 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
-#if defined(__KERNEL__)
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
#include "inc/ocfs_journal.h"
-#else
-#include <asm/bitops.h>
-#include <dummy.h>
-#endif
/* Tracing */
#define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_BITMAP
Modified: trunk/src/dcache.c
===================================================================
--- trunk/src/dcache.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/dcache.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/dir.c
===================================================================
--- trunk/src/dir.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/dir.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/dlm.c
===================================================================
--- trunk/src/dlm.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/dlm.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/extmap.c
===================================================================
--- trunk/src/extmap.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/extmap.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/file.c
===================================================================
--- trunk/src/file.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/file.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/hash.c
===================================================================
--- trunk/src/hash.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/hash.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/heartbeat.c
===================================================================
--- trunk/src/heartbeat.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/heartbeat.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,18 +24,15 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
-#if !defined(USERSPACE_TOOL)
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
#include "inc/ocfs_journal.h"
-#endif
-#if defined(USERSPACE_TOOL)
-#include <format.h>
-#endif
-
/* Tracing */
#define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_HEARTBEAT
Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/inc/ocfs.h 2004-06-02 01:55:02 UTC (rev 968)
@@ -31,41 +31,19 @@
** System header files
*/
#define __KERNEL_SYSCALLS__
-#include <linux/version.h>
-#include <linux/types.h>
-#include <linux/config.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-#ifdef __ia64__
-extern inline void prefetch(const void *x);
-extern inline void prefetchw(const void *x);
-#else
-static inline void prefetch(const void *x);
-static inline void prefetchw(const void *x);
-#endif
-extern inline int generic_fls(int x);
-extern inline int get_bitmask_order(unsigned int count);
-/* XXX Hack to avoid warning */
-struct mem_dqinfo;
-extern inline void mark_info_dirty(struct mem_dqinfo *info);
#else /* 2.4 kernel */
#include <asm/processor.h>
#endif /* 2.6 kernel */
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <asm/byteorder.h>
#include <linux/spinlock.h>
-#include <linux/slab.h>
#include <linux/sched.h>
-#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/list.h>
#include <linux/fs.h>
#include <linux/pagemap.h>
#include <linux/random.h>
-#include <linux/string.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <linux/writeback.h>
#else
@@ -73,20 +51,12 @@
#endif
#include <linux/hdreg.h>
#include <linux/file.h>
-#include <linux/raw.h>
-#include <linux/vmalloc.h>
-#include <linux/proc_fs.h>
#include <linux/unistd.h>
-#include <asm/uaccess.h>
-#include <linux/net.h>
-#include <net/sock.h>
-#include <linux/ctype.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <linux/workqueue.h>
#else
#include <linux/tqueue.h>
#endif
-#include <linux/inet.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <linux/statfs.h>
#include <linux/blkdev.h>
@@ -96,7 +66,17 @@
#endif
#include <linux/smp_lock.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#include <linux/iobuf.h>
+#endif /* for 2.5 - no more kiovec, kiobuf structures - vfs handles
+ * this for us (direct i/o) */
+#include <linux/sysctl.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#include <linux/moduleparam.h>
+#endif
+
+
#define OCFS_BITMAP_CHUNK (512) /* size of a chunk, in bytes */
#define OCFS_BITS_IN_CHUNK (OCFS_BITMAP_CHUNK * 8)
/* Lovely convenience macros. If we move to a scheme where
@@ -755,15 +735,6 @@
})
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-#include <linux/iobuf.h>
-#endif /* for 2.5 - no more kiovec, kiobuf structures - vfs handles
- * this for us (direct i/o) */
-#include <linux/sysctl.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-#include <linux/moduleparam.h>
-#endif
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
#define free_kiovec_sz(nr, buf, bh) free_kiovec(nr, buf)
#define alloc_kiovec_sz(nr, buf, bh) alloc_kiovec(nr, buf)
Added: trunk/src/inc/ocfs_compat.h
===================================================================
--- trunk/src/inc/ocfs_compat.h 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/inc/ocfs_compat.h 2004-06-02 01:55:02 UTC (rev 968)
@@ -0,0 +1,50 @@
+/*
+ * ocfs_compat.h
+ *
+ * Compatibility stuff for 2.4
+ *
+ * Copyright (C) 2004 Oracle. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation, version
+ * 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 021110-1307, USA.
+ *
+ * Authors: Kurt Hackel, Mark Fasheh, Sunil Mushran, Wim Coekaerts,
+ * Manish Singh, Neeraj Goyal, Suchit Kaura
+ */
+
+#ifndef OCFS_COMPAT_H
+#define OCFS_COMPAT_H
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+
+#ifdef __ia64__
+extern inline void prefetch(const void *x);
+extern inline void prefetchw(const void *x);
+#else
+static inline void prefetch(const void *x);
+static inline void prefetchw(const void *x);
+#endif
+extern inline int generic_fls(int x);
+extern inline int get_bitmask_order(unsigned int count);
+/* XXX Hack to avoid warning */
+struct mem_dqinfo;
+extern inline void mark_info_dirty(struct mem_dqinfo *info);
+
+#endif /* LINUX_VERSION_CODE */
+
+#endif /* OCFS_COMPAT_H */
+
Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/inode.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/io.c
===================================================================
--- trunk/src/io.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/io.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/ioctl.c
===================================================================
--- trunk/src/ioctl.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/ioctl.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,8 +24,13 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
+#include <asm/uaccess.h>
+
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/journal.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Joel Becker
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/lockres.c
===================================================================
--- trunk/src/lockres.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/lockres.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/namei.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/nm.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,12 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/bitops.h>
+#include <linux/net.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/proc.c
===================================================================
--- trunk/src/proc.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/proc.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -26,7 +26,11 @@
#define OCFSPROC_PRIVATE_DECLS
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/proc_fs.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/super.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,8 +24,13 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/utsname.h>
+#include <linux/module.h>
#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/init.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/symlink.c
===================================================================
--- trunk/src/symlink.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/symlink.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -30,7 +30,10 @@
* for CDSL support
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/sysfile.c
===================================================================
--- trunk/src/sysfile.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/sysfile.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,16 +24,16 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
-#ifdef __KERNEL__
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
+#warning dont vmalloc
+#include <linux/vmalloc.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
#include "inc/ocfs_journal.h"
-#else
-#include <dummy.h>
-#include <ocfsmalloc.h>
-#endif
/* Tracing */
#define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_SYSFILE
Modified: trunk/src/util.c
===================================================================
--- trunk/src/util.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/util.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,14 +24,13 @@
* Manish Singh
*/
-#ifdef __KERNEL__
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
-#else
-#include <debugocfs.h>
-#endif
/* Tracing */
#define OCFS_DEBUG_CONTEXT OCFS_DEBUG_CONTEXT_UTIL
Modified: trunk/src/ver.c
===================================================================
--- trunk/src/ver.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/ver.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,13 +24,16 @@
* Manish Singh
*/
+#include "inc/ocfs_compat.h"
+
+#include <linux/module.h>
#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/kernel.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
-#include <linux/kernel.h>
-#include <linux/module.h>
MODULE_DESCRIPTION("The Oracle Cluster Filesystem (version "
OCFS_BUILD_VERSION
Modified: trunk/src/volcfg.c
===================================================================
--- trunk/src/volcfg.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/volcfg.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,7 +24,10 @@
* Manish Singh, Neeraj Goyal, Suchit Kaura
*/
+#include "inc/ocfs_compat.h"
+
#include <linux/types.h>
+#include <linux/slab.h>
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
Modified: trunk/src/vote.c
===================================================================
--- trunk/src/vote.c 2004-06-02 00:48:27 UTC (rev 967)
+++ trunk/src/vote.c 2004-06-02 01:55:02 UTC (rev 968)
@@ -24,8 +24,18 @@
* Manish Singh
*/
+#include "inc/ocfs_compat.h"
+
+#include <linux/fs.h>
#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/inet.h>
+#include <linux/net.h>
+#include <net/sock.h>
+
+#include <asm/uaccess.h>
+
#include "inc/ocfs_log.h"
#include "inc/ocfs.h"
More information about the Ocfs2-commits
mailing list