Whamcloud - gitweb
Branch HEAD
authoryangsheng <yangsheng>
Thu, 15 Jan 2009 02:39:41 +0000 (02:39 +0000)
committeryangsheng <yangsheng>
Thu, 15 Jan 2009 02:39:41 +0000 (02:39 +0000)
b=17153
i=adilger, tappro

Remove 2.4 compatibility from HEAD.

lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_user.h
lustre/include/lustre_quota.h
lustre/lvfs/Makefile.in
lustre/mdd/mdd_lproc.c
lustre/obdclass/Makefile.in
lustre/ptlrpc/Makefile.in
lustre/quota/quota_adjust_qunit.c
lustre/quota/quota_interface.c

index 657dbef..4e00bf6 100644 (file)
@@ -84,45 +84,6 @@ $2
 ])
 
 #
-# LC_STRUCT_KIOBUF
-#
-# rh 2.4.18 has iobuf->dovary, but other kernels do not
-#
-AC_DEFUN([LC_STRUCT_KIOBUF],
-[AC_MSG_CHECKING([if struct kiobuf has a dovary field])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/iobuf.h>
-],[
-       struct kiobuf iobuf;
-       iobuf.dovary = 1;
-],[
-       AC_MSG_RESULT([yes])
-       AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_COND_RESCHED
-#
-# cond_resched() was introduced in 2.4.20
-#
-AC_DEFUN([LC_FUNC_COND_RESCHED],
-[AC_MSG_CHECKING([if kernel offers cond_resched])
-LB_LINUX_TRY_COMPILE([
-       #include <linux/sched.h>
-],[
-       cond_resched();
-],[
-       AC_MSG_RESULT([yes])
-       AC_DEFINE(HAVE_COND_RESCHED, 1, [cond_resched found])
-],[
-       AC_MSG_RESULT([no])
-])
-])
-
-#
 # LC_FUNC_RELEASEPAGE_WITH_INT
 #
 # if ->releasepage() takes an int arg in 2.6.9
@@ -141,39 +102,6 @@ else
 fi
 ])
 
-
-#
-# LC_FUNC_ZAP_PAGE_RANGE
-#
-# if zap_page_range() takes a vma arg
-#
-AC_DEFUN([LC_FUNC_ZAP_PAGE_RANGE],
-[AC_MSG_CHECKING([if zap_page_range with vma parameter])
-ZAP_PAGE_RANGE_VMA="`grep -c 'zap_page_range.*struct vm_area_struct' $LINUX/include/linux/mm.h`"
-if test "$ZAP_PAGE_RANGE_VMA" != 0 ; then
-       AC_DEFINE(ZAP_PAGE_RANGE_VMA, 1, [zap_page_range with vma parameter])
-       AC_MSG_RESULT([yes])
-else
-       AC_MSG_RESULT([no])
-fi
-])
-
-#
-# LC_FUNC_PDE
-#
-# if proc_fs.h defines PDE()
-#
-AC_DEFUN([LC_FUNC_PDE],
-[AC_MSG_CHECKING([if kernel defines PDE])
-HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
-if test "$HAVE_PDE" != 0 ; then
-       AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE])
-       AC_MSG_RESULT([yes])
-else
-       AC_MSG_RESULT([no])
-fi
-])
-
 #
 # LC_FUNC_FILEMAP_FDATASYNC
 #
@@ -194,22 +122,6 @@ LB_LINUX_TRY_COMPILE([
 ])
 
 #
-# LC_FUNC_DIRECT_IO
-#
-# if direct_IO takes a struct file argument
-#
-AC_DEFUN([LC_FUNC_DIRECT_IO],
-[AC_MSG_CHECKING([if kernel passes struct file to direct_IO])
-HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
-if test "$HAVE_DIO_FILE" != 0 ; then
-       AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO])
-       AC_MSG_RESULT(yes)
-else
-       AC_MSG_RESULT(no)
-fi
-])
-
-#
 # LC_HEADER_MM_INLINE
 #
 # RHEL kernels define page_count in mm_inline.h
@@ -1588,12 +1500,7 @@ AC_DEFUN([LC_PROG_LINUX],
          LC_EXPORT___D_MOVE
          LC_EXPORT_NODE_TO_CPUMASK
 
-         LC_STRUCT_KIOBUF
-         LC_FUNC_COND_RESCHED
          LC_FUNC_RELEASEPAGE_WITH_INT
-         LC_FUNC_ZAP_PAGE_RANGE
-         LC_FUNC_PDE
-         LC_FUNC_DIRECT_IO
          LC_HEADER_MM_INLINE
          LC_STRUCT_INODE
          LC_FUNC_REGISTER_CACHE
index da302bc..b44679e 100644 (file)
@@ -48,9 +48,6 @@
 # endif
 #else
 # include <linux/version.h>
-# if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21)
-#  define NEED_QUOTA_DEFS
-# endif
 # ifdef HAVE_QUOTA_SUPPORT
 #  include <linux/quota.h>
 # endif
index 1823fec..b4a2314 100644 (file)
@@ -190,7 +190,6 @@ struct dquot_id {
 #define QFILE_CONVERT           7
 
 /* admin quotafile operations */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
 int lustre_check_quota_file(struct lustre_quota_info *lqi, int type);
 int lustre_read_quota_info(struct lustre_quota_info *lqi, int type);
 int lustre_write_quota_info(struct lustre_quota_info *lqi, int type);
@@ -200,46 +199,6 @@ int lustre_init_quota_info(struct lustre_quota_info *lqi, int type);
 int lustre_get_qids(struct file *file, struct inode *inode, int type,
                     struct list_head *list);
 int lustre_quota_convert(struct lustre_quota_info *lqi, int type);
-#else
-
-#ifndef DQ_FAKE_B
-#define DQ_FAKE_B       6
-#endif
-
-static inline int lustre_check_quota_file(struct lustre_quota_info *lqi,
-                                          int type)
-{
-        return 0;
-}
-static inline int lustre_read_quota_info(struct lustre_quota_info *lqi,
-                                         int type)
-{
-        return 0;
-}
-static inline int lustre_write_quota_info(struct lustre_quota_info *lqi,
-                                          int type)
-{
-        return 0;
-}
-static inline int lustre_read_dquot(struct lustre_dquot *dquot)
-{
-        return 0;
-}
-static inline int lustre_commit_dquot(struct lustre_dquot *dquot)
-{
-        return 0;
-}
-static inline int lustre_init_quota_info(struct lustre_quota_info *lqi,
-                                         int type)
-{
-        return 0;
-}
-static inline int lustre_quota_convert(struct lustre_quota_info *lqi,
-                                       int type)
-{
-        return 0;
-}
-#endif  /* KERNEL_VERSION(2,5,0) */
 
 #define LL_DQUOT_OFF(sb)    DQUOT_OFF(sb)
 
index f103b62..4b8773b 100644 (file)
@@ -7,12 +7,10 @@ lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o prng.o lvfs_lib.
 
 @QUOTA_TRUE@quotafmt-objs := quotafmt_test.o
 
-ifeq ($(PATCHLEVEL),6)
 fsfilt_@BACKINGFS@-objs := fsfilt-@BACKINGFS@.o
 
 $(obj)/fsfilt-%.c: $(obj)/fsfilt_%.c
        ln -s $< $@
-endif
 
 # for <ext3/xattr.h> on 2.6
 EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LDISKFS_DIR@ -I@LDISKFS_DIR@/ldiskfs
index d675478..4cdc048 100644 (file)
@@ -46,6 +46,7 @@
 #define DEBUG_SUBSYSTEM S_MDS
 
 #include <linux/module.h>
+#include <linux/poll.h>
 #include <obd.h>
 #include <obd_class.h>
 #include <lustre_ver.h>
index 2c7f0d2..90d898e 100644 (file)
@@ -1,23 +1,11 @@
 MODULES := obdclass llog_test
 
 obdclass-linux-objs := linux-module.o linux-obdo.o linux-sysctl.o
-ifeq ($(PATCHLEVEL),6)
 obdclass-linux-objs := $(addprefix linux/,$(obdclass-linux-objs))
-endif
 
 default: all
 
-ifeq (@linux25@,no)
 sources:
-       @for i in $(obdclass-linux-objs:%.o=%.c) ; do \
-               echo "ln -s @srcdir@/linux/$$i ." ; \
-               ln -sf @srcdir@/linux/$$i . || exit 1 ; \
-       done
-
-else
-sources:
-
-endif
 
 obdclass-all-objs := llog.o llog_cat.o llog_lvfs.o llog_obd.o llog_swab.o
 obdclass-all-objs += class_obd.o class_hash.o
@@ -33,11 +21,9 @@ obdclass-objs := $(obdclass-linux-objs) $(obdclass-all-objs)
 
 EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LDISKFS_DIR@ -I@LDISKFS_DIR@/ldiskfs
 
-ifeq ($(PATCHLEVEL),6)
 llog_test-objs := llog-test.o
 
 $(obj)/llog-test.c: $(obj)/llog_test.c
        ln -sf $< $@
-endif
 
 @INCLUDE_RULES@
index 9ade7d5..aee4786 100644 (file)
@@ -1,9 +1,6 @@
 MODULES := ptlrpc
-ifeq ($(PATCHLEVEL),6)
 LDLM := @top_srcdir@/lustre/ldlm/
-else
-LDLM :=
-endif
+
 ldlm_objs := $(LDLM)l_lock.o $(LDLM)ldlm_lock.o 
 ldlm_objs += $(LDLM)ldlm_resource.o $(LDLM)ldlm_lib.o
 ldlm_objs += $(LDLM)ldlm_plain.o $(LDLM)ldlm_extent.o
index 20ee26b..df2115d 100644 (file)
 # include <linux/fs.h>
 # include <linux/jbd.h>
 # include <linux/quota.h>
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  include <linux/smp_lock.h>
-#  include <linux/buffer_head.h>
-#  include <linux/workqueue.h>
-#  include <linux/mount.h>
-# else
-#  include <linux/locks.h>
-# endif
+# include <linux/smp_lock.h>
+# include <linux/buffer_head.h>
+# include <linux/workqueue.h>
+# include <linux/mount.h>
 #else /* __KERNEL__ */
 # include <liblustre.h>
 #endif
index f257cd5..71bed54 100644 (file)
 # include <linux/init.h>
 # include <linux/fs.h>
 # include <linux/jbd.h>
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  include <linux/smp_lock.h>
-#  include <linux/buffer_head.h>
-#  include <linux/workqueue.h>
-#  include <linux/mount.h>
-# else
-#  include <linux/locks.h>
-# endif
+# include <linux/smp_lock.h>
+# include <linux/buffer_head.h>
+# include <linux/workqueue.h>
+# include <linux/mount.h>
 #else /* __KERNEL__ */
 # include <liblustre.h>
 #endif