From b26f39067bd87ad8a9840e03acbf75f3a47f6352 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 15 Jan 2009 02:39:41 +0000 Subject: [PATCH] Branch HEAD b=17153 i=adilger, tappro Remove 2.4 compatibility from HEAD. --- lustre/autoconf/lustre-core.m4 | 93 -------------------------------------- lustre/include/linux/lustre_user.h | 3 -- lustre/include/lustre_quota.h | 41 ----------------- lustre/lvfs/Makefile.in | 2 - lustre/mdd/mdd_lproc.c | 1 + lustre/obdclass/Makefile.in | 14 ------ lustre/ptlrpc/Makefile.in | 5 +- lustre/quota/quota_adjust_qunit.c | 12 ++--- lustre/quota/quota_interface.c | 12 ++--- 9 files changed, 10 insertions(+), 173 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 657dbef..4e00bf6 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -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 -],[ - 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 -],[ - 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 diff --git a/lustre/include/linux/lustre_user.h b/lustre/include/linux/lustre_user.h index da302bc..b44679e 100644 --- a/lustre/include/linux/lustre_user.h +++ b/lustre/include/linux/lustre_user.h @@ -48,9 +48,6 @@ # endif #else # include -# if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21) -# define NEED_QUOTA_DEFS -# endif # ifdef HAVE_QUOTA_SUPPORT # include # endif diff --git a/lustre/include/lustre_quota.h b/lustre/include/lustre_quota.h index 1823fec..b4a2314 100644 --- a/lustre/include/lustre_quota.h +++ b/lustre/include/lustre_quota.h @@ -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) diff --git a/lustre/lvfs/Makefile.in b/lustre/lvfs/Makefile.in index f103b62..4b8773b 100644 --- a/lustre/lvfs/Makefile.in +++ b/lustre/lvfs/Makefile.in @@ -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 on 2.6 EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LDISKFS_DIR@ -I@LDISKFS_DIR@/ldiskfs diff --git a/lustre/mdd/mdd_lproc.c b/lustre/mdd/mdd_lproc.c index d675478..4cdc048 100644 --- a/lustre/mdd/mdd_lproc.c +++ b/lustre/mdd/mdd_lproc.c @@ -46,6 +46,7 @@ #define DEBUG_SUBSYSTEM S_MDS #include +#include #include #include #include diff --git a/lustre/obdclass/Makefile.in b/lustre/obdclass/Makefile.in index 2c7f0d2..90d898e 100644 --- a/lustre/obdclass/Makefile.in +++ b/lustre/obdclass/Makefile.in @@ -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@ diff --git a/lustre/ptlrpc/Makefile.in b/lustre/ptlrpc/Makefile.in index 9ade7d5..aee4786 100644 --- a/lustre/ptlrpc/Makefile.in +++ b/lustre/ptlrpc/Makefile.in @@ -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 diff --git a/lustre/quota/quota_adjust_qunit.c b/lustre/quota/quota_adjust_qunit.c index 20ee26b..df2115d 100644 --- a/lustre/quota/quota_adjust_qunit.c +++ b/lustre/quota/quota_adjust_qunit.c @@ -45,14 +45,10 @@ # include # include # include -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# include -# include -# include -# include -# else -# include -# endif +# include +# include +# include +# include #else /* __KERNEL__ */ # include #endif diff --git a/lustre/quota/quota_interface.c b/lustre/quota/quota_interface.c index f257cd5..71bed54 100644 --- a/lustre/quota/quota_interface.c +++ b/lustre/quota/quota_interface.c @@ -45,14 +45,10 @@ # include # include # include -# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -# include -# include -# include -# include -# else -# include -# endif +# include +# include +# include +# include #else /* __KERNEL__ */ # include #endif -- 1.8.3.1