Whamcloud - gitweb
LU-9236 kernel: new kernel RHEL 6.9 [2.6.32-696.el6]
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 365727e..b0d90ef 100644 (file)
@@ -341,13 +341,17 @@ AS_IF([test "x$enable_gss" != xno], [
        ], [
                enable_gss="no"
        ])
+
+       enable_ssk=$enable_gss
 ])
 ]) # LC_CONFIG_GSS
 
-# LC_HAVE_VOID_OPENSSL_HMAC_FUNCS
+# LC_OPENSSL_SSK
 #
-# OpenSSL 1.0+ return int for HMAC functions but previous versions do not
-AC_DEFUN([LC_HAVE_VOID_OPENSSL_HMAC_FUNCS], [
+# OpenSSL 1.0+ return int for HMAC functions but older SLES11 versions do not
+AC_DEFUN([LC_OPENSSL_SSK], [
+AC_MSG_CHECKING([whether OpenSSL has functions needed for SSK])
+AS_IF([test "x$enable_ssk" != xno], [
 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
        #include <openssl/hmac.h>
        #include <openssl/evp.h>
@@ -358,10 +362,12 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
                HMAC_CTX_init(&ctx);
                rc = HMAC_Init_ex(&ctx, "test", 4, EVP_md_null(), NULL);
        }
-])],[],[AC_DEFINE(HAVE_VOID_OPENSSL_HMAC_FUNCS, 1,
-               [OpenSSL HMAC functions return void instead of int])
+])],[AC_DEFINE(HAVE_OPENSSL_SSK, 1,
+              [OpenSSL HMAC functions needed for SSK])],
+       [enable_ssk="no"])
 ])
-]) # LC_HAVE_VOID_OPENSSL_HMAC_FUNCS
+AC_MSG_RESULT([$enable_ssk])
+]) # LC_OPENSSL_SSK
 
 # LC_INODE_PERMISION_2ARGS
 #
@@ -783,6 +789,18 @@ dirty_inode_super_operation_flag, [
 ]) # LC_DIRTY_INODE_WITH_FLAG
 
 #
+# LC_SETNS
+#
+# 3.0 introduced setns
+#
+AC_DEFUN([LC_SETNS], [
+AC_CHECK_HEADERS([sched.h], [], [],
+                [#define _GNU_SOURCE
+                ])
+AC_CHECK_FUNCS([setns])
+]) # LC_SETNS
+
+#
 # LC_GENERIC_PERMISSION
 #
 # 2.6.38 generic_permission taken 4 parameters.
@@ -1377,6 +1395,22 @@ bio_end_sector, [
 ]) # LC_HAVE_BIO_END_SECTOR
 
 #
+# 3.9 created is_sxid
+#
+AC_DEFUN([LC_HAVE_IS_SXID], [
+LB_CHECK_COMPILE([if 'is_sxid' is defined],
+is_sxid, [
+       #include <linux/fs.h>
+],[
+       struct inode inode;
+
+       is_sxid(inode.i_mode);
+],[
+       AC_DEFINE(HAVE_IS_SXID, 1, [is_sxid is defined])
+])
+]) # LC_HAVE_IS_SXID
+
+#
 # LC_HAVE_REMOVE_PROC_SUBTREE
 #
 # 3.10 introduced remove_proc_subtree
@@ -1431,6 +1465,23 @@ block_device_ops_release_return_int, [
 ]) # LC_BLKDEV_RELEASE_RETURN_INT
 
 #
+# LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
+#
+# 3.10 introduced security_dentry_init_security()
+#
+AC_DEFUN([LC_HAVE_SECURITY_DENTRY_INIT_SECURITY], [
+LB_CHECK_COMPILE([if 'security_dentry_init_security' is defined],
+security_dentry_init_security, [
+       #include <linux/security.h>
+],[
+       security_dentry_init_security(NULL, 0, NULL, NULL, NULL);
+],[
+       AC_DEFINE(HAVE_SECURITY_DENTRY_INIT_SECURITY, 1,
+               [security_dentry_init_security' is defined])
+])
+]) # LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
+
+#
 # LC_INVALIDATE_RANGE
 #
 # 3.11 invalidatepage requires the length of the range to invalidate
@@ -1502,6 +1553,24 @@ d_count, [
 ]) # LC_HAVE_DCOUNT
 
 #
+# LC_PID_NS_FOR_CHILDREN
+#
+# 3.11 replaces pid_ns by pid_ns_for_children in struct nsproxy
+#
+AC_DEFUN([LC_PID_NS_FOR_CHILDREN], [
+LB_CHECK_COMPILE([if 'struct nsproxy' has 'pid_ns_for_children'],
+pid_ns_for_children, [
+       #include <linux/nsproxy.h>
+],[
+       struct nsproxy ns;
+       ns.pid_ns_for_children = NULL;
+],[
+       AC_DEFINE(HAVE_PID_NS_FOR_CHILDREN, 1,
+                 ['struct nsproxy' has 'pid_ns_for_children'])
+])
+]) # LC_PID_NS_FOR_CHILDREN
+
+#
 # LC_OLDSIZE_TRUNCATE_PAGECACHE
 #
 # 3.12 truncate_pagecache without oldsize parameter
@@ -1644,6 +1713,26 @@ have_bvec_iter, [
 ]) # LC_HAVE_BVEC_ITER
 
 #
+# LC_HAVE_BI_CNT
+#
+# 4.4 redefined bi_cnt as __bi_cnt
+#
+AC_DEFUN([LC_HAVE_BI_CNT], [
+LB_CHECK_COMPILE([if Linux kernel has bi_cnt in struct bio],
+have_bi_cnt, [
+       #include <asm/atomic.h>
+       #include <linux/bio.h>
+],[
+       struct bio bio;
+       int cnt;
+       cnt = atomic_read(&bio.bi_cnt);
+], [
+       AC_DEFINE(HAVE_BI_CNT, 1,
+               [struct bio has bi_cnt])
+])
+]) # LC_HAVE_BI_CNT
+
+#
 # LC_HAVE_TRUNCATE_IPAGE_FINAL
 #
 # 3.14 bring truncate_inode_pages_final for evict_inode
@@ -1851,6 +1940,30 @@ ki_nbytes, [
 ]) # LC_KIOCB_HAS_NBYTES
 
 #
+# LC_HAVE_DQUOT_QC_DQBLK
+#
+# 3.19 has quotactl_ops->[sg]et_dqblk that take struct kqid and qc_dqblk
+# Added in commit 14bf61ffe
+#
+AC_DEFUN([LC_HAVE_DQUOT_QC_DQBLK], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_CHECK_COMPILE([if 'quotactl_ops.set_dqblk' takes struct qc_dqblk],
+qc_dqblk, [
+       #include <linux/fs.h>
+       #include <linux/quota.h>
+],[
+       ((struct quotactl_ops *)0)->set_dqblk(NULL, *((struct kqid*)0), (struct qc_dqblk*)0);
+],[
+       AC_DEFINE(HAVE_DQUOT_QC_DQBLK, 1,
+               [quotactl_ops.set_dqblk takes struct qc_dqblk])
+       AC_DEFINE(HAVE_DQUOT_KQID, 1,
+               [quotactl_ops.set_dqblk takes struct kqid])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+]) # LC_HAVE_DQUOT_QC_DQBLK
+
+#
 # LC_BACKING_DEV_INFO_REMOVAL
 #
 # 3.20 kernel removed backing_dev_info from address_space
@@ -2144,6 +2257,41 @@ inode_ops_get_link, [
 ]) # LC_HAVE_IOP_GET_LINK
 
 #
+# LC_HAVE_IN_COMPAT_SYSCALL
+#
+# 4.6 renamed is_compat_task to in_compat_syscall
+#
+AC_DEFUN([LC_HAVE_IN_COMPAT_SYSCALL], [
+LB_CHECK_COMPILE([if 'in_compat_syscall' is defined],
+in_compat_syscall, [
+       #include <linux/compat.h>
+],[
+       in_compat_syscall();
+],[
+       AC_DEFINE(HAVE_IN_COMPAT_SYSCALL, 1,
+               [have in_compat_syscall])
+])
+]) # LC_HAVE_IN_COMPAT_SYSCALL
+
+#
+# LC_HAVE_POSIX_ACL_VALID_USER_NS
+#
+# 4.8 posix_acl_valid takes struct user_namespace
+#
+AC_DEFUN([LC_HAVE_POSIX_ACL_VALID_USER_NS], [
+LB_CHECK_COMPILE([if 'posix_acl_valid' takes 'struct user_namespace'],
+posix_acl_valid, [
+       #include <linux/fs.h>
+       #include <linux/posix_acl.h>
+],[
+       posix_acl_valid((struct user_namespace*)NULL, (const struct posix_acl*)NULL);
+],[
+       AC_DEFINE(HAVE_POSIX_ACL_VALID_USER_NS, 1,
+               [posix_acl_valid takes struct user_namespace])
+])
+]) # LC_HAVE_POSIX_ACL_VALID_USER_NS
+
+#
 # LC_PROG_LINUX
 #
 # Lustre linux kernel checks
@@ -2156,11 +2304,10 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC_CONFIG_CHECKSUM
        LC_CONFIG_HEALTH_CHECK_WRITE
        LC_CONFIG_LRU_RESIZE
-       LC_LLITE_LLOOP_MODULE
 
        LC_GLIBC_SUPPORT_FHANDLES
        LC_CONFIG_GSS
-       LC_HAVE_VOID_OPENSSL_HMAC_FUNCS
+       LC_OPENSSL_SSK
 
        # 2.6.32
        LC_BLK_QUEUE_MAX_SEGMENTS
@@ -2200,6 +2347,7 @@ AC_DEFUN([LC_PROG_LINUX], [
 
        # 3.0
        LC_DIRTY_INODE_WITH_FLAG
+       LC_SETNS
 
        # 3.1
        LC_LM_XXX_LOCK_MANAGER_OPS
@@ -2247,11 +2395,13 @@ AC_DEFUN([LC_PROG_LINUX], [
        # 3.9
        LC_HAVE_HLIST_FOR_EACH_3ARG
        LC_HAVE_BIO_END_SECTOR
+       LC_HAVE_IS_SXID
 
        # 3.10
        LC_BLKDEV_RELEASE_RETURN_INT
        LC_HAVE_REMOVE_PROC_SUBTREE
        LC_HAVE_PROC_REMOVE
+       LC_HAVE_SECURITY_DENTRY_INIT_SECURITY
 
        # 3.11
        LC_INVALIDATE_RANGE
@@ -2260,6 +2410,7 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC_HAVE_DCOUNT
        LC_HAVE_DENTRY_D_U_D_ALIAS
        LC_HAVE_DENTRY_D_CHILD
+       LC_PID_NS_FOR_CHILDREN
 
        # 3.12
        LC_OLDSIZE_TRUNCATE_PAGECACHE
@@ -2291,6 +2442,7 @@ AC_DEFUN([LC_PROG_LINUX], [
 
        # 3.19
        LC_KIOCB_HAS_NBYTES
+       LC_HAVE_DQUOT_QC_DQBLK
 
        # 3.20
        LC_BACKING_DEV_INFO_REMOVAL
@@ -2315,6 +2467,7 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC_HAVE_LOCKS_LOCK_FILE_WAIT
        LC_HAVE_QC_MAKE_REQUEST_FN
        LC_HAVE_KEY_PAYLOAD_DATA_ARRAY
+       LC_HAVE_BI_CNT
 
        # 4.5
        LC_HAVE_FILE_DENTRY
@@ -2323,6 +2476,12 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC_HAVE_INODE_LOCK
        LC_HAVE_IOP_GET_LINK
 
+       # 4.6
+       LC_HAVE_IN_COMPAT_SYSCALL
+
+       # 4.8
+       LC_HAVE_POSIX_ACL_VALID_USER_NS
+
        #
        AS_IF([test "x$enable_server" != xno], [
                LC_FUNC_DEV_SET_RDONLY
@@ -2438,25 +2597,6 @@ AS_IF([test "x$enable_nodemap_proc_debug" != xno],
 ]) # LC_NODEMAP_PROC_DEBUG
 
 #
-# LC_LLITE_LLOOP_MODULE
-#
-# lloop_llite.ko does not currently work with page sizes
-# of 64k or larger.
-#
-AC_DEFUN([LC_LLITE_LLOOP_MODULE], [
-LB_CHECK_COMPILE([whether to enable 'llite_lloop' module],
-enable_llite_lloop_module, [
-       #include <asm/page.h>
-],[
-       #if PAGE_SIZE >= 65536
-       #error "PAGE_SIZE >= 65536"
-       #endif
-],
-       [enable_llite_lloop_module="yes"],
-       [enable_llite_lloop_module="no"])
-]) # LC_LLITE_LLOOP_MODULE
-
-#
 # LC_OSD_ADDON
 #
 # configure support for optional OSD implementation
@@ -2614,8 +2754,8 @@ AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
 AM_CONDITIONAL(GSS, test x$enable_gss = xyes)
 AM_CONDITIONAL(GSS_KEYRING, test x$enable_gss_keyring = xyes)
 AM_CONDITIONAL(GSS_PIPEFS, test x$enable_gss_pipefs = xyes)
+AM_CONDITIONAL(GSS_SSK, test x$enable_ssk = xyes)
 AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
-AM_CONDITIONAL(LLITE_LLOOP, test x$enable_llite_lloop_module = xyes)
 ]) # LC_CONDITIONALS
 
 #
@@ -2633,7 +2773,9 @@ lustre/contrib/Makefile
 lustre/doc/Makefile
 lustre/include/Makefile
 lustre/include/lustre/Makefile
+lustre/include/uapi/linux/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/2.6-rhel6.7.target
 lustre/kernel_patches/targets/2.6-rhel6.6.target
@@ -2644,6 +2786,7 @@ lustre/kernel_patches/targets/3.0-sles11.target
 lustre/kernel_patches/targets/3.0-sles11sp3.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/2.6-fc11.target
 lustre/kernel_patches/targets/2.6-fc12.target
 lustre/kernel_patches/targets/2.6-fc15.target