]) # LC_SBOPS_EVICT_INODE
#
-# LC_FILE_FSYNC
-#
-# 2.6.35 file_operations.fsync taken 2 arguments.
-# 3.0.0 file_operations.fsync takes 4 arguments.
-#
-AC_DEFUN([LC_FILE_FSYNC], [
-LB_CHECK_COMPILE([if 'file_operations.fsync' takes 4 arguments],
-file_ops_fsync_4args, [
- #include <linux/fs.h>
-],[
- ((struct file_operations *)0)->fsync(NULL, 0, 0, 0);
-],[
- AC_DEFINE(HAVE_FILE_FSYNC_4ARGS, 1,
- [file_operations.fsync takes 4 arguments])
-],[
- LB_CHECK_COMPILE([if 'file_operations.fsync' takes 2 arguments],
- file_ops_fsync_2args, [
- #include <linux/fs.h>
- ],[
- ((struct file_operations *)0)->fsync(NULL, 0);
- ],[
- AC_DEFINE(HAVE_FILE_FSYNC_2ARGS, 1,
- [file_operations.fsync takes 2 arguments])
- ])
-])
-]) # LC_FILE_FSYNC
-
-#
# LC_KERNEL_LOCKED
#
# 2.6.37 remove kernel_locked
])
]) # LC_FS_STRUCT_SEQCOUNT
+# LC_DENTRY_PATH_RAW
+#
+# Kernel version 2.6.37 commit ec2447c278ee973d35f38e53ca16ba7f965ae33d
+# dentry_path_raw is exported
+#
+AC_DEFUN([LC_DENTRY_PATH_RAW], [
+LB_CHECK_COMPILE([if 'dentry_path_raw' exist],
+dentry_path_raw, [
+ #include <linux/dcache.h>
+],[
+ dentry_path_raw(NULL, NULL, 0);
+],[
+ AC_DEFINE(HAVE_DENTRY_PATH_RAW, 1,
+ ['dentry_path_raw' is available])
+])
+]) # LC_DENTRY_PATH_RAW
+
#
# LC_D_COMPARE_7ARGS
#
]) # LC_HAVE_SECURITY_IINITSEC
#
+# 2.6.39 vfs_create takes a 'struct nameidata' parameter
+#
+AC_DEFUN([LC_VFS_CREATE_USE_NAMEIDATA], [
+LB_CHECK_COMPILE([if vfs_create takes a struct nameidata parameter],
+vfs_create, [
+ #include <linux/namei.h>
+ #include <linux/fs.h>
+],[
+ struct nameidata *nd;
+ vfs_create(NULL, NULL, 0, nd);
+],[
+ AC_DEFINE(HAVE_VFS_CREATE_USE_NAMEIDATA, 1,
+ [vfs_create use nameidata as parameter])
+])
+]) # LC_VFS_CREATE_USE_NAMEIDATA
+
+#
# LC_HAVE_MIGRATE_HEADER
#
# 3.3 introduces migrate_mode.h and migratepage has 4 args
]) # LC_HAVE_IS_SXID
#
+# LC_HAVE_VFS_GETATTR_2ARGS
+#
+AC_DEFUN([LC_HAVE_VFS_GETATTR_2ARGS], [
+LB_CHECK_COMPILE([if vfs_getattr takes 2 args],
+vfs_getattr, [
+ #include <linux/fs.h>
+],[
+ struct path path;
+
+ vfs_getattr(&path, NULL);
+],[
+ AC_DEFINE(HAVE_VFS_GETATTR_2ARGS, 1,
+ [vfs_getattr takes 2 args])
+])
+]) # LC_HAVE_VFS_GETATTR_2ARGS
+
+#
# LC_HAVE_REMOVE_PROC_SUBTREE
#
# 3.10 introduced remove_proc_subtree
]) # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
#
+# 3.10 exports security_inode_listsecurity
+#
+AC_DEFUN([LC_HAVE_SECURITY_INODE_LISTSECURITY], [
+LB_CHECK_COMPILE([if security_inode_listsecurity() is available/exported],
+security_inode_listsecurity, [
+ #include <linux/security.h>
+],[
+ security_inode_listsecurity(NULL, NULL, 0);
+],[
+ AC_DEFINE(HAVE_SECURITY_INODE_LISTSECURITY, 1,
+ [security_inode_listsecurity() is available/exported])
+])
+]) # LC_HAVE_SECURITY_INODE_LISTSECURITY
+
+#
# LC_INVALIDATE_RANGE
#
# 3.11 invalidatepage requires the length of the range to invalidate
])
]) # LC_VFS_UNLINK_3ARGS
+# LC_HAVE_D_IS_POSITIVE
+#
+# Kernel version 3.13 b18825a7c8e37a7cf6abb97a12a6ad71af160de7
+# d_is_positive is added
+#
+AC_DEFUN([LC_HAVE_D_IS_POSITIVE], [
+LB_CHECK_COMPILE([if 'd_is_positive' exist],
+d_is_positive, [
+ #include <linux/dcache.h>
+],[
+ d_is_positive(NULL);
+],[
+ AC_DEFINE(HAVE_D_IS_POSITIVE, 1,
+ ['d_is_positive' is available])
+])
+]) # LC_HAVE_D_IS_POSITIVE
+
#
# LC_HAVE_BVEC_ITER
#
]) # LIBCFS_CURRENT_TIME
#
+# Kernel version 4.12-rc3 85787090a21eb749d8b347eaf9ff1a455637473c
+# changed struct super_block s_uuid into a proper uuid_t
+#
+AC_DEFUN([LC_SUPER_BLOCK_S_UUID], [
+LB_CHECK_COMPILE([if 'struct super_block' s_uuid is uuid_t],
+super_block_s_uuid, [
+ #include <linux/fs.h>
+],[
+ struct super_block sb;
+
+ uuid_parse(NULL, &sb.s_uuid);
+],[
+ AC_DEFINE(HAVE_S_UUID_AS_UUID_T, 1, ['s_uuid' is an uuid_t])
+])
+]) # LC_SUPER_BLOCK_S_UUID
+
+#
# LC_SUPER_SETUP_BDI_NAME
#
# Kernel version 4.12 commit 9594caf216dc0fe3e318b34af0127276db661241
]) # LC_BI_STATUS
#
+# LC_UAPI_LINUX_MOUNT_H
+#
+# kernel 4.20 commit e262e32d6bde0f77fb0c95d977482fc872c51996
+# vfs: Suppress MS_* flag defs within the kernel ...
+#
+AC_DEFUN([LC_UAPI_LINUX_MOUNT_H], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_CHECK_COMPILE([if MS_RDONLY was moved to uapi/linux/mount.h],
+uapi_linux_mount, [
+ #include <uapi/linux/mount.h>
+],[
+ int x = MS_RDONLY;
+ (void)x;
+],[
+ AC_DEFINE(HAVE_UAPI_LINUX_MOUNT_H, 1,
+ [if MS_RDONLY was moved to uapi/linux/mount.h])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+]) # LC_UAPI_LINUX_MOUNT_H
+
+#
# LC_BIO_INTEGRITY_ENABLED
#
# 4.13 removed bio_integrity_enabled
]) # LC_BI_BDEV
#
+# LC_I_PAGES
+#
+# kernel 4.17 commit b93b016313b3ba8003c3b8bb71f569af91f19fc7
+#
+AC_DEFUN([LC_I_PAGES], [
+LB_CHECK_COMPILE([if struct address_space has i_pages],
+i_pages, [
+ #include <linux/fs.h>
+],[
+ struct address_space mapping = {};
+ void *i_pages;
+
+ i_pages = &mapping.i_pages;
+],[
+ AC_DEFINE(HAVE_I_PAGES, 1,
+ [struct address_space has i_pages])
+])
+]) # LC_I_PAGES
+
+#
+# LC_INODE_TIMESPEC64
+#
+# kernel 4.17-rc7 commit 8efd6894ff089adeeac7cb9f32125b85d963d1bc
+# fs: add timespec64_truncate()
+# kernel 4.18 commit 95582b00838837fc07e042979320caf917ce3fe6
+# inode timestamps switched to timespec64
+# kernel 4.19-rc2 commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8
+# y2038: remove unused time interfaces
+# ...
+# timespec_trunc
+# ...
+# When inode times are timespec64 stop using the deprecated
+# time interfaces.
+#
+AC_DEFUN([LC_INODE_TIMESPEC64], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_CHECK_COMPILE([if inode timestamps are struct timespec64],
+inode_timespec64, [
+ #include <linux/fs.h>
+],[
+ struct inode inode = {};
+ struct timespec64 ts = {};
+
+ inode.i_atime = timespec64_trunc(ts, 1);
+ (void)inode;
+],[
+ AC_DEFINE(HAVE_INODE_TIMESPEC64, 1,
+ [inode times are using timespec64])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+]) # LC_INODE_TIMESPEC64
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
LC_HAVE_ADD_WAIT_QUEUE_EXCLUSIVE
# 2.6.35, 3.0.0
- LC_FILE_FSYNC
LC_EXPORT_SIMPLE_SETATTR
LC_EXPORT_TRUNCATE_COMPLETE_PAGE
# 2.6.37
LC_KERNEL_LOCKED
LC_FS_STRUCT_SEQCOUNT
+ LC_DENTRY_PATH_RAW
# 2.6.38
LC_BLKDEV_GET_BY_DEV
LC_HAVE_FSTYPE_MOUNT
LC_HAVE_INODE_OWNER_OR_CAPABLE
LC_HAVE_SECURITY_IINITSEC
+ LC_VFS_CREATE_USE_NAMEIDATA
# 3.0
LC_DIRTY_INODE_WITH_FLAG
LC_HAVE_HLIST_FOR_EACH_3ARG
LC_HAVE_BIO_END_SECTOR
LC_HAVE_IS_SXID
+ LC_HAVE_VFS_GETATTR_2ARGS
# 3.10
LC_HAVE_REMOVE_PROC_SUBTREE
LC_HAVE_PROC_REMOVE
LC_HAVE_PROJECT_QUOTA
LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
+ LC_HAVE_SECURITY_INODE_LISTSECURITY
# 3.11
LC_INVALIDATE_RANGE
# 3.13
LC_VFS_RENAME_5ARGS
LC_VFS_UNLINK_3ARGS
+ LC_HAVE_D_IS_POSITIVE
# 3.14
LC_HAVE_BVEC_ITER
# 4.12
LC_CURRENT_TIME
+ LC_SUPER_BLOCK_S_UUID
LC_SUPER_SETUP_BDI_NAME
LC_BI_STATUS
LC_PAGEVEC_INIT_ONE_PARAM
LC_BI_BDEV
+ # 4.17
+ LC_I_PAGES
+
+ # 4.18
+ LC_INODE_TIMESPEC64
+
+ # 5.0
+ LC_UAPI_LINUX_MOUNT_H
+
# kernel patch to extend integrity interface
LC_BIO_INTEGRITY_PREP_FN
case $enableval in
yes)
MPICC_WRAPPER="mpicc"
+ MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
;;
no)
enable_mpitests="no"
+ MPI_BIN=""
;;
*)
MPICC_WRAPPER=$enableval
+ MPI_BIN=$(eval echo $MPICC_WRAPPER | xargs dirname)
;;
esac
], [
enable_mpitests="yes"
MPICC_WRAPPER="mpicc"
+ MPI_BIN=$(eval which $MPICC_WRAPPER | xargs dirname)
])
if test "x$enable_mpitests" != "xno"; then
enable_mpitests=$lb_cv_mpi_tests
CC=$oldcc
fi
+ AC_SUBST(MPI_BIN)
AC_SUBST(MPICC_WRAPPER)
]) # LB_CONFIG_MPITESTS
AC_CHECK_HEADERS([ext2fs/ext2fs.h])
# lustre/utils/lfs.c
-AC_CHECK_LIB([z], [crc32], [
- AC_CHECK_HEADER([zlib.h], [], [
- AC_MSG_ERROR([zlib.h not found.])])
- ], [
- AC_MSG_ERROR([
-zlib library not found. Please install zlib development package.])
+AS_IF([test "$enable_dist" = "no"], [
+ AC_CHECK_LIB([z], [crc32], [
+ AC_CHECK_HEADER([zlib.h], [], [
+ AC_MSG_ERROR([zlib.h not found.])])
+ ], [
+ AC_MSG_ERROR([
+ zlib library not found. Please install zlib development package.])
+ ])
])
SELINUX=""
lustre/include/Makefile
lustre/include/lustre/Makefile
lustre/include/uapi/linux/lustre/Makefile
+lustre/kernel_patches/targets/4.18-rhel8.target
lustre/kernel_patches/targets/3.10-rhel7.6.target
lustre/kernel_patches/targets/3.10-rhel7.5.target
lustre/kernel_patches/targets/4.14-rhel7.5.target