[Ocfs2-commits] jlbec commits r1808 - in trunk: . fs fs/ocfs2
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Thu Jan 20 16:44:52 CST 2005
Author: jlbec
Date: 2005-01-20 16:44:50 -0600 (Thu, 20 Jan 2005)
New Revision: 1808
Added:
trunk/fs/Makefile
Modified:
trunk/Makefile
trunk/configure.in
trunk/fs/ocfs2/Makefile
trunk/fs/ocfs2/dlmglue.c
Log:
Step 2 of the migration, make the ocfs2 source work again.
o Make the 2.6 kbuild stuff run from fs/
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2005-01-20 19:50:37 UTC (rev 1807)
+++ trunk/Makefile 2005-01-20 22:44:50 UTC (rev 1808)
@@ -2,7 +2,7 @@
include $(TOPDIR)/Preamble.make
-SUBDIRS = usysfs cluster src docs patches vendor
+SUBDIRS = usysfs cluster fs docs patches vendor
DIST_FILES = \
COPYING \
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2005-01-20 19:50:37 UTC (rev 1807)
+++ trunk/configure.in 2005-01-20 22:44:50 UTC (rev 1808)
@@ -1,4 +1,4 @@
-AC_INIT(src/Makefile)
+AC_INIT(fs/Makefile)
PACKAGE=ocfs2
Added: trunk/fs/Makefile
===================================================================
--- trunk/fs/Makefile 2005-01-20 19:50:37 UTC (rev 1807)
+++ trunk/fs/Makefile 2005-01-20 22:44:50 UTC (rev 1808)
@@ -0,0 +1,66 @@
+
+ifeq ($(KERNELRELEASE),)
+TOPDIR = ..
+
+include $(TOPDIR)/Preamble.make
+else
+# We are included by kbuild.
+
+OUR_TOPDIR := $(M)/..
+
+include $(OUR_TOPDIR)/Config.make
+
+endif
+
+#
+# As 2.6 kbuild is unhappy seeing SUBDIRS, this is a safe one to
+# set globally. Do not include trailing slashes.
+#
+SAFE_SUBDIRS := ocfs2
+
+ifneq ($(KERNELRELEASE),)
+#
+# Called under kbuild 2.6
+#
+
+obj-m += $(addsuffix /,$(SAFE_SUBDIRS))
+
+else
+#
+# Called from a regular "make".
+#
+
+ifneq ($(KERNEL_26),)
+#
+# This is a 2.6 kernel. Just forward to kbuild.
+#
+
+ALL_RULES = build-modules
+
+CLEAN_RULES = clean-modules
+
+INSTALL_RULES = install-modules
+
+
+build-modules:
+ $(MAKE) -C ocfs2 stamp-md5
+ $(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules
+
+install-modules:
+ $(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules_install
+
+clean-modules:
+ $(MAKE) -C $(KERNELDIR) M=$(CURDIR) clean
+ rm ocfs2/stamp-md5
+else
+#
+# This is a 2.4 kernel. Let Makebo handle recursion.
+#
+
+SUBDIRS = $(SAFE_SUBDIRS)
+
+endif
+
+include $(TOPDIR)/Postamble.make
+
+endif
Modified: trunk/fs/ocfs2/Makefile
===================================================================
--- trunk/fs/ocfs2/Makefile 2005-01-20 19:50:37 UTC (rev 1807)
+++ trunk/fs/ocfs2/Makefile 2005-01-20 22:44:50 UTC (rev 1808)
@@ -1,16 +1,16 @@
ifeq ($(KERNELRELEASE),)
-TOPDIR = ..
+TOPDIR = ../..
include $(TOPDIR)/Preamble.make
else
# We are included by kbuild.
-OUR_SRC_DIR := $(M)
+OUR_TOPDIR := $(M)/..
-include $(OUR_SRC_DIR)/../Config.make
+include $(OUR_TOPDIR)/Config.make
-CLUSTERINC := $(OUR_SRC_DIR)/..
+CLUSTERINC := $(OUR_TOPDIR)
EXTRA_CFLAGS += -I$(CLUSTERINC)
endif
@@ -130,8 +130,8 @@
#
# Argh, Versioning.make has ordering requirements, so we put this here
#
-STAMP_DIR = $(OUR_SRC_DIR)
-include $(OUR_SRC_DIR)/../Versioning.make
+STAMP_DIR := $(OUR_TOPDIR)/fs/ocfs2
+include $(OUR_TOPDIR)/Versioning.make
CFLAGS_$(VERSION_OBJ) += $(VERDEFS)
endif
@@ -142,7 +142,7 @@
DIST_FILES = $(SOURCES) $(HEADERS)
-ALL_RULES = build-modules
+ALL_RULES = stamp-md5 build-modules
CLEAN_RULES = clean-modules
@@ -155,13 +155,13 @@
#
build-modules:
- $(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules
+ $(MAKE) -C $(TOPDIR)/fs build-modules
install-modules:
- $(MAKE) -C $(KERNELDIR) M=$(CURDIR) modules_install
+ $(MAKE) -C $(TOPDIR)/fs install-modules
clean-modules:
- $(MAKE) -C $(KERNELDIR) M=$(CURDIR) clean
+ $(MAKE) -C $(TOPDIR)/fs clean-modules
else
#
# This is a 2.4 kernel. Because Red Hat's source tree is whack, do
Modified: trunk/fs/ocfs2/dlmglue.c
===================================================================
--- trunk/fs/ocfs2/dlmglue.c 2005-01-20 19:50:37 UTC (rev 1807)
+++ trunk/fs/ocfs2/dlmglue.c 2005-01-20 22:44:50 UTC (rev 1808)
@@ -28,6 +28,7 @@
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/highmem.h>
+#include <linux/mm.h>
#include <linux/smp_lock.h>
#include <cluster/util.h>
@@ -1951,7 +1952,7 @@
sync_mapping_buffers(inode->i_mapping);
if (blocking == LKM_EXMODE) {
ocfs_truncate_inode_pages(inode, 0);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)
unmap_mapping_range(inode->i_mapping, 0, 0, 0);
#endif
}
More information about the Ocfs2-commits
mailing list