fi
])
-# 2.6.24
-
-# 2.6.24 has bio_endio with 2 args
-AC_DEFUN([LC_BIO_ENDIO_2ARG],
-[AC_MSG_CHECKING([if kernel has bio_endio with 2 args])
-LB_LINUX_TRY_COMPILE([
- #include <linux/bio.h>
-],[
- bio_endio(NULL, 0);
-], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_BIO_ENDIO_2ARG, 1,
- [kernel has bio_endio with 2 args])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.24 removes long aged procfs entry -> deleted member
-AC_DEFUN([LC_PROCFS_DELETED],
-[AC_MSG_CHECKING([if kernel has deleted member in procfs entry struct])
-LB_LINUX_TRY_COMPILE([
- #include <linux/proc_fs.h>
-],[
- struct proc_dir_entry pde;
-
- pde.deleted = sizeof(pde);
-], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_PROCFS_DELETED, 1,
- [kernel has deleted member in procfs entry struct])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# 2.6.27
-#
-
# up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
# v2.6.27->v2.6.37 had a 2 arg version (inode, mask)
# v2.6.37->v3.0 had a 3 arg version (inode, mask, nameidata)
])
])
+# 2.6.32 replaces 2 functions blk_queue_max_phys_segments and blk_queue_max_hw_segments by blk_queue_max_segments
+AC_DEFUN([LC_BLK_QUEUE_MAX_SEGMENTS],
+[AC_MSG_CHECKING([if blk_queue_max_segments is defined])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/blkdev.h>
+],[
+ blk_queue_max_segments(NULL, 0);
+],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BLK_QUEUE_MAX_SEGMENTS, 1,
+ [blk_queue_max_segments is defined])
+],[
+ AC_MSG_RESULT(no)
+])
+])
+
# 2.6.34 has quotactl_ops->[sg]et_dqblk that take struct fs_disk_quota
AC_DEFUN([LC_HAVE_DQUOT_FS_DISK_QUOTA],
tmp_flags="$EXTRA_KCFLAGS"
#include <linux/fs.h>
#include <linux/quota.h>
],[
- struct quotactl_ops qops = {};
- struct fs_disk_quota fdq;
- qops.set_dqblk(NULL, 0, 0, &fdq);
+ ((struct quotactl_ops *)0)->set_dqblk(NULL, 0, 0, (struct fs_disk_quota*)0);
],[
AC_DEFINE(HAVE_DQUOT_FS_DISK_QUOTA, 1, [quotactl_ops.set_dqblk takes struct fs_disk_quota])
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([if quotactl_ops.set_dqblk takes struct kqid & fs_disk_quota])
+ LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ #include <linux/quota.h>
+ ],[
+ ((struct quotactl_ops *)0)->set_dqblk((struct super_block*)0, *((struct kqid*)0), (struct fs_disk_quota*)0);
+ ],[
+ AC_DEFINE(HAVE_DQUOT_FS_DISK_QUOTA, 1, [quotactl_ops.set_dqblk takes struct fs_disk_quota])
+ AC_DEFINE(HAVE_DQUOT_KQID, 1, [quotactl_ops.set_dqblk takes struct kqid])
+ AC_MSG_RESULT([yes])
+ ],[
+ AC_MSG_RESULT([no])
+ AC_MSG_CHECKING([if quotactl_ops.set_dqblk takes struct kqid&fs_disk_quota])
+ ])
])
EXTRA_KCFLAGS="$tmp_flags"
])
])
])
-# 2.6.27.15-2 sles11
-
-# 2.6.27 sles11 remove the bi_hw_segments
-AC_DEFUN([LC_BI_HW_SEGMENTS],
-[AC_MSG_CHECKING([struct bio has a bi_hw_segments field])
-LB_LINUX_TRY_COMPILE([
- #include <linux/bio.h>
-],[
- struct bio io;
- io.bi_hw_segments = sizeof(io);
-],[
- AC_DEFINE(HAVE_BI_HW_SEGMENTS, 1,
- [struct bio has a bi_hw_segments field])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# 2.6.27 sles11 move the quotaio_v1{2}.h from include/linux to fs
-# 2.6.32 move the quotaio_v1{2}.h from fs to fs/quota
-AC_DEFUN([LC_HAVE_QUOTAIO_H],
-[LB_CHECK_FILE([$LINUX/include/linux/quotaio_v2.h],[
- AC_DEFINE(HAVE_QUOTAIO_H, 1,
- [kernel has include/linux/quotaio_v2.h])
-],[LB_CHECK_FILE([$LINUX/fs/quotaio_v2.h],[
- AC_DEFINE(HAVE_FS_QUOTAIO_H, 1,
- [kernel has fs/quotaio_v1.h])
-],[LB_CHECK_FILE([$LINUX/fs/quota/quotaio_v2.h],[
- AC_DEFINE(HAVE_FS_QUOTA_QUOTAIO_H, 1,
- [kernel has fs/quota/quotaio_v2.h])
-],[
- AC_MSG_RESULT([no])
-])
-])
-])
-])
-
-# 2.6.32
-
-# 2.6.32 replaces 2 functions blk_queue_max_phys_segments and blk_queue_max_hw_segments by blk_queue_max_segments
-AC_DEFUN([LC_BLK_QUEUE_MAX_SEGMENTS],
-[AC_MSG_CHECKING([if blk_queue_max_segments is defined])
-LB_LINUX_TRY_COMPILE([
- #include <linux/blkdev.h>
-],[
- blk_queue_max_segments(NULL, 0);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_BLK_QUEUE_MAX_SEGMENTS, 1,
- [blk_queue_max_segments is defined])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
#
# LC_QUOTA64
#
])
#
+# truncate callback removed since 2.6.39
+#
+AC_DEFUN([LC_IOP_TRUNCATE],
+[AC_MSG_CHECKING([inode_operations has .truncate member function])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+],[
+ ((struct inode_operations *)0)->truncate(NULL);
+],[
+ AC_DEFINE(HAVE_INODEOPS_TRUNCATE, 1,
+ [inode_operations has .truncate member function])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
# 2.6.39 remove unplug_fn from request_queue.
#
AC_DEFUN([LC_REQUEST_QUEUE_UNPLUG_FN],
])
#
-# 3.1.1 has ext4_blocks_for_truncate
-#
-AC_DEFUN([LC_BLOCKS_FOR_TRUNCATE],
-[AC_MSG_CHECKING([if kernel has ext4_blocks_for_truncate])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
- #include "$LINUX/fs/ext4/ext4_jbd2.h"
- #include "$LINUX/fs/ext4/truncate.h"
-],[
- ext4_blocks_for_truncate(NULL);
-],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_BLOCKS_FOR_TRUNCATE, 1,
- [kernel has ext4_blocks_for_truncate])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
# 3.1 introduced generic_file_llseek_size()
#
AC_DEFUN([LC_FILE_LLSEEK_SIZE],
])
#
+# 3.8 struct file has new memeber f_inode
+#
+AC_DEFUN([LC_HAVE_FILE_F_INODE],
+[AC_MSG_CHECKING([if struct file has memeber f_inode])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+],[
+ ((struct file *)0)->f_inode = NULL;
+],[
+ AC_DEFINE(HAVE_FILE_F_INODE, 1,
+ [struct file has memeber f_inode])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
# 3.9 uses hlist_for_each_entry with 3 args
# b67bfe0d42cac56c512dd5da4b1b347a23f4b70a
#
])
#
+# 3.10+ only supports procfs seq_files handling
+#
+AC_DEFUN([LC_HAVE_ONLY_PROCFS_SEQ],
+[AC_MSG_CHECKING([if procfs only supports using seq_files])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/proc_fs.h>
+],[
+ ((struct proc_dir_entry *)0)->write_proc(NULL, NULL, 0, NULL);
+],[
+ AC_MSG_RESULT([no])
+],[
+ AC_DEFINE(HAVE_ONLY_PROCFS_SEQ, 1, [only seq_files supported])
+ AC_MSG_RESULT([yes])
+])
+])
+
+# 3.10 release for block device doesn't return int
+AC_DEFUN([LC_BLKDEV_RELEASE_RETURN_INT],
+[AC_MSG_CHECKING([if block_device_operations release returns int])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/blkdev.h>
+],[
+ struct block_device_operations fops;
+ int i __attribute__ ((unused));
+
+ i = fops.release(NULL,0);
+],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_BLKDEV_RELEASE_RETURN_INT, 1,
+ [block device release returns int])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
+# 3.11 need to access d_count to get dentry reference count
+#
+AC_DEFUN([LC_HAVE_DCOUNT],
+[AC_MSG_CHECKING([if d_count exist])
+LB_LINUX_TRY_COMPILE([
+ #include <linux/dcache.h>
+],[
+ struct dentry de;
+
+ d_count(&de);
+],[
+ AC_DEFINE(HAVE_D_COUNT, 1, [d_count exist])
+ AC_MSG_RESULT([yes])
+],[
+ AC_MSG_RESULT([no])
+])
+])
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
LC_CONFIG_RMTCLIENT
LC_CONFIG_GSS
- # 2.6.24
- LC_BIO_ENDIO_2ARG
- LC_PROCFS_DELETED
-
- # 2.6.27.15-2 sles11
- LC_BI_HW_SEGMENTS
- LC_HAVE_QUOTAIO_H
-
- # 2.6.32
- LC_BLK_QUEUE_MAX_SEGMENTS
+ # 2.6.32
+ LC_BLK_QUEUE_MAX_SEGMENTS
# 2.6.34
LC_HAVE_DQUOT_FS_DISK_QUOTA
# 2.6.39
LC_REQUEST_QUEUE_UNPLUG_FN
LC_HAVE_FSTYPE_MOUNT
+ LC_IOP_TRUNCATE
# 3.0
LC_DIRTY_INODE_WITH_FLAG
LC_FILE_LLSEEK_SIZE
LC_INODE_PERMISION_2ARGS
- # 3.1.1
- LC_BLOCKS_FOR_TRUNCATE
-
# 3.2
LC_HAVE_VOID_MAKE_REQUEST_FN
LC_HAVE_PROTECT_I_NLINK
# 3.7
LC_HAVE_POSIXACL_USER_NS
+ # 3.8
+ LC_HAVE_FILE_F_INODE
+
# 3.9
LC_HAVE_HLIST_FOR_EACH_3ARG
LC_HAVE_F_PATH_MNT
+ # 3.10
+ LC_HAVE_ONLY_PROCFS_SEQ
+ LC_BLKDEV_RELEASE_RETURN_INT
+
+ # 3.11
+ LC_HAVE_DCOUNT
+
#
if test x$enable_server != xno ; then
LC_FUNC_DEV_SET_RDONLY
# libsysio/src/readlink.c
LC_READLINK_SSIZE_T
-# lvfs/prng.c - depends on linux/types.h from liblustre/dir.c
+# libcfs prng.c - depends on linux/types.h from liblustre/dir.c
AC_CHECK_HEADERS([linux/random.h], [], [],
[#ifdef HAVE_LINUX_TYPES_H
# include <linux/types.h>
lustre/lclient/Makefile
lustre/lov/Makefile
lustre/lov/autoMakefile
-lustre/lvfs/Makefile
-lustre/lvfs/autoMakefile
lustre/mdc/Makefile
lustre/mdc/autoMakefile
lustre/lmv/Makefile