]) # LC_TARGET_SUPPORTED
#
-# LC_CONFIG_OBD_BUFFER_SIZE
-#
-# the maximum buffer size of lctl ioctls
-#
-AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE], [
-AC_MSG_CHECKING([for maximum OBD ioctl size])
-AC_ARG_WITH([obd-buffer-size],
- AC_HELP_STRING([--with-obd-buffer-size=[size]],
- [set lctl ioctl maximum bytes (default=8192)]),
- [OBD_BUFFER_SIZE=$with_obd_buffer_size],
- [OBD_BUFFER_SIZE=8192])
-AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
-AC_DEFINE_UNQUOTED(CONFIG_LUSTRE_OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE,
- [IOCTL Buffer Size])
-]) # LC_CONFIG_OBD_BUFFER_SIZE
-
-#
# LC_GLIBC_SUPPORT_FHANDLES
#
AC_DEFUN([LC_GLIBC_SUPPORT_FHANDLES], [
]) # LC_IOP_TRUNCATE
#
-# LC_REQUEST_QUEUE_UNPLUG_FN
-#
-# 2.6.39 remove unplug_fn from request_queue.
-#
-AC_DEFUN([LC_REQUEST_QUEUE_UNPLUG_FN], [
-LB_CHECK_COMPILE([if 'request_queue' has 'unplug_fn' field],
-request_queue_unplug_fn, [
- #include <linux/blkdev.h>
-],[
- do {} while(sizeof(((struct request_queue *)0)->unplug_fn));
-],[
- AC_DEFINE(HAVE_REQUEST_QUEUE_UNPLUG_FN, 1,
- [request_queue has unplug_fn field])
-])
-]) # LC_REQUEST_QUEUE_UNPLUG_FN
-
-#
# LC_HAVE_FSTYPE_MOUNT
#
# 2.6.39 replace get_sb with mount in struct file_system_type
]) # LC_RADIX_EXCEPTION_ENTRY
#
-# LC_HAVE_VOID_MAKE_REQUEST_FN
-#
-# 3.2 request_queue.make_request_fn defined as function returns with void
-# see kernel commit 5a7bbad27a410350e64a2d7f5ec18fc73836c14f
-#
-AC_DEFUN([LC_HAVE_VOID_MAKE_REQUEST_FN], [
-LB_CHECK_COMPILE([if 'request_queue.make_request_fn' returns void but not int],
-make_request_fn_void, [
- #include <linux/blkdev.h>
-],[
- int ret;
- make_request_fn *mrf;
- ret = mrf(NULL, NULL);
-],[],[
- AC_DEFINE(HAVE_VOID_MAKE_REQUEST_FN, 1,
- [request_queue.make_request_fn returns void but not int])
-])
-]) # LC_HAVE_VOID_MAKE_REQUEST_FN
-
-#
# LC_HAVE_PROTECT_I_NLINK
#
# 3.2 protects inode->i_nlink from direct modification
])
]) # LC_HAVE_PROC_REMOVE
-#
-# LC_BLKDEV_RELEASE_RETURN_INT
-#
-# 3.10 release for block device doesn't return int
-#
-AC_DEFUN([LC_BLKDEV_RELEASE_RETURN_INT], [
-LB_CHECK_COMPILE([if 'block_device_operations' release returns 'int'],
-block_device_ops_release_return_int, [
- #include <linux/blkdev.h>
-],[
- struct block_device_operations fops;
- int i __attribute__ ((unused));
-
- i = fops.release(NULL, 0);
-],[
- AC_DEFINE(HAVE_BLKDEV_RELEASE_RETURN_INT, 1,
- [block device release returns int])
-])
-]) # LC_BLKDEV_RELEASE_RETURN_INT
-
AC_DEFUN([LC_HAVE_PROJECT_QUOTA], [
LB_CHECK_COMPILE([if get_projid exists],
get_projid, [
]) # LC_HAVE_BI_CNT
#
+# LC_HAVE_BI_RW
+#
+# 4.4 redefined bi_rw as bi_opf
+#
+AC_DEFUN([LC_HAVE_BI_RW], [
+LB_CHECK_COMPILE([if Linux kernel has bi_rw in struct bio],
+have_bi_rw, [
+ #include <linux/bio.h>
+],[
+ struct bio bio;
+ bio.bi_rw;
+], [
+ AC_DEFINE(HAVE_BI_RW, 1,
+ [struct bio has bi_rw])
+])
+]) # LC_HAVE_BI_RW
+
+#
+# LC_HAVE_SUBMIT_BIO_2ARGS
+#
+# 4.4 removed an argument from submit_bio
+#
+AC_DEFUN([LC_HAVE_SUBMIT_BIO_2ARGS], [
+LB_CHECK_COMPILE([if submit_bio takes two arguments],
+have_submit_bio_2args, [
+ #include <linux/bio.h>
+],[
+ struct bio bio;
+ submit_bio(READ, &bio);
+], [
+ AC_DEFINE(HAVE_SUBMIT_BIO_2ARGS, 1,
+ [submit_bio takes two arguments])
+])
+]) # LC_HAVE_SUBMIT_BIO_2_ARGS
+
+#
+# LC_HAVE_CLEAN_BDEV_ALIASES
+#
+# 4.4 unmap_underlying_metadata was replaced by clean_bdev_aliases
+#
+AC_DEFUN([LC_HAVE_CLEAN_BDEV_ALIASES], [
+LB_CHECK_COMPILE([if kernel has clean_bdev_aliases],
+have_clean_bdev_aliases, [
+ #include <linux/buffer_head.h>
+],[
+ struct block_device bdev;
+ clean_bdev_aliases(&bdev,1,1);
+], [
+ AC_DEFINE(HAVE_CLEAN_BDEV_ALIASES, 1,
+ [kernel has clean_bdev_aliases])
+])
+]) # LC_HAVE_CLEAN_BDEV_ALIASES
+
+#
# LC_HAVE_TRUNCATE_IPAGE_FINAL
#
# 3.14 bring truncate_inode_pages_final for evict_inode
]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT
#
-# LC_HAVE_QC_MAKE_REQUEST_FN
-#
-# 4.4 request_queue.make_request_fn defined as function returns with blk_qc_t
-# see kernel commit dece16353ef47d8d33f5302bc158072a9d65e26f
-#
-AC_DEFUN([LC_HAVE_QC_MAKE_REQUEST_FN], [
-LB_CHECK_COMPILE([if 'request_queue.make_request_fn' returns blk_qc_t],
-make_request_fn_blk_qc_t, [
- #include <linux/blkdev.h>
-],[
- blk_qc_t ret;
- make_request_fn *mrf;
- ret = mrf(NULL, NULL);
-],[
- AC_DEFINE(HAVE_QC_MAKE_REQUEST_FN, 1,
- [request_queue.make_request_fn returns blk_qc_t])
-])
-]) # LC_HAVE_QC_MAKE_REQUEST_FN
-
-#
# LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
#
# 4.4 kernel merged type-specific data with the payload data for keys
]) # LC_HAVE_VM_FAULT_ADDRESS
#
+# LC_INODEOPS_ENHANCED_GETATTR
+#
+# Kernel version 4.11 commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
+# expanded getattr to be able to get more stat information.
+#
+AC_DEFUN([LC_INODEOPS_ENHANCED_GETATTR], [
+LB_CHECK_COMPILE([if 'inode_operations' getattr member can gather advance stats],
+getattr_path, [
+ #include <linux/fs.h>
+],[
+ struct path path;
+
+ ((struct inode_operations *)1)->getattr(&path, NULL, 0, 0);
+],[
+ AC_DEFINE(HAVE_INODEOPS_ENHANCED_GETATTR, 1,
+ [inode_operations .getattr member function can gather advance stats])
+])
+]) # LC_INODEOPS_ENHANCED_GETATTR
+
+#
# LC_VM_OPERATIONS_REMOVE_VMF_ARG
#
# Kernel version 4.11 commit 11bac80004499ea59f361ef2a5516c84b6eab675
]) # LC_VM_OPERATIONS_REMOVE_VMF_ARG
#
+# Kernel version 4.12 commit 47f38c539e9a42344ff5a664942075bd4df93876
+# CURRENT_TIME is not 64 bit time safe so it was replaced with
+# current_time()
+#
+AC_DEFUN([LC_CURRENT_TIME], [
+LB_CHECK_COMPILE([if CURRENT_TIME has been replaced with current_time],
+current_time, [
+ #include <linux/fs.h>
+],[
+ struct timespec ts = current_time(NULL);
+],[
+ AC_DEFINE(HAVE_CURRENT_TIME, 1,
+ [current_time() has replaced CURRENT_TIME])
+])
+]) # LIBCFS_CURRENT_TIME
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
LC_HAVE_BLK_PLUG
# 2.6.39
- LC_REQUEST_QUEUE_UNPLUG_FN
LC_HAVE_FHANDLE_SYSCALLS
LC_HAVE_FSTYPE_MOUNT
LC_IOP_TRUNCATE
LC_HAVE_LOOP_CTL_GET_FREE
# 3.2
- LC_HAVE_VOID_MAKE_REQUEST_FN
LC_HAVE_PROTECT_I_NLINK
# 3.3
LC_HAVE_IS_SXID
# 3.10
- LC_BLKDEV_RELEASE_RETURN_INT
LC_HAVE_REMOVE_PROC_SUBTREE
LC_HAVE_PROC_REMOVE
LC_HAVE_PROJECT_QUOTA
# 4.4
LC_HAVE_LOCKS_LOCK_FILE_WAIT
- LC_HAVE_QC_MAKE_REQUEST_FN
LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
LC_HAVE_BI_CNT
+ LC_HAVE_BI_RW
+ LC_HAVE_SUBMIT_BIO_2ARGS
+ LC_HAVE_CLEAN_BDEV_ALIASES
# 4.5
LC_HAVE_FILE_DENTRY
LC_HAVE_VM_FAULT_ADDRESS
# 4.11
+ LC_INODEOPS_ENHANCED_GETATTR
LC_VM_OPERATIONS_REMOVE_VMF_ARG
+ # 4.12
+ LC_CURRENT_TIME
+
#
AS_IF([test "x$enable_server" != xno], [
LC_STACK_SIZE
AC_MSG_NOTICE([Lustre core checks
==============================================================================])
-LC_CONFIG_OBD_BUFFER_SIZE
-
AS_IF([test $target_cpu == "i686" -o $target_cpu == "x86_64"],
[CFLAGS="$CFLAGS -Wall -Werror"])
lustre/doc/Makefile
lustre/include/Makefile
lustre/include/lustre/Makefile
-lustre/include/uapi/linux/Makefile
+lustre/include/uapi/linux/lustre/Makefile
lustre/kernel_patches/targets/3.10-rhel7.target
lustre/kernel_patches/targets/2.6-rhel6.9.target
lustre/kernel_patches/targets/2.6-rhel6.8.target
lustre/kernel_patches/targets/3.0-sles11sp4.target
lustre/kernel_patches/targets/3.12-sles12.target
lustre/kernel_patches/targets/4.4-sles12.target
+lustre/kernel_patches/targets/4.4-sles12sp3.target
lustre/kernel_patches/targets/2.6-fc11.target
lustre/kernel_patches/targets/2.6-fc12.target
lustre/kernel_patches/targets/2.6-fc15.target