])
#
-# 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
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
#
])
#
-# 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
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
# 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
#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);
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)
@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
#define DEBUG_SUBSYSTEM S_MDS
#include <linux/module.h>
+#include <linux/poll.h>
#include <obd.h>
#include <obd_class.h>
#include <lustre_ver.h>
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
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@
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
# 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
# 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