From 73938f8965d07cfcbe8ae1305fe161a7dc887fde Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Fri, 22 May 2020 11:06:34 -0700 Subject: [PATCH] LU-13488 kernel: new kernel [RHEL 8.2 4.18.0-193.1.2.el8] This patch makes changes to support new RHEL 8.2 release for Lustre client. Test-Parameters: trivial clientdistro=el8.2 \ env=SANITY_EXCEPT="130" testlist=sanity Change-Id: Icb1db3afd2e94423a45354acfdd559f8f1e294cb Signed-off-by: Jian Yu Reviewed-on: https://review.whamcloud.com/38461 Reviewed-by: Yang Sheng Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lnet/autoconf/lustre-lnet.m4 | 29 ++++++++++++++++++++++ lnet/lnet/config.c | 3 ++- lustre/ChangeLog | 1 + lustre/autoconf/lustre-core.m4 | 1 + .../kernel_patches/targets/4.18-rhel8.2.target.in | 26 +++++++++++++++++++ 5 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 lustre/kernel_patches/targets/4.18-rhel8.2.target.in diff --git a/lnet/autoconf/lustre-lnet.m4 b/lnet/autoconf/lustre-lnet.m4 index 7787e86..2ad1840 100644 --- a/lnet/autoconf/lustre-lnet.m4 +++ b/lnet/autoconf/lustre-lnet.m4 @@ -769,6 +769,33 @@ EXTRA_KCFLAGS="$tmp_flags" ]) # LN_CONFIG_SOCK_GETNAME # +# LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL +# +# kernel 5.3 commit ef11db3310e272d3d8dbe8739e0770820dd20e52 +# and kernel 4.18.0-193.el8: +# added in_dev_for_each_ifa_rtnl and in_dev_for_each_ifa_rcu +# and removed for_ifa and endfor_ifa. +# Use the _rntl variant as the current locking is rtnl. +# +AC_DEFUN([LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL], [ +tmp_flags="$EXTRA_KCFLAGS" +EXTRA_KCFLAGS="-Werror" +LB_CHECK_COMPILE([if 'in_dev_for_each_ifa_rtnl' is defined], +in_dev_for_each_ifa_rtnl_test, [ + #include +],[ + const struct in_ifaddr *ifa = NULL; + struct in_device *in_dev = NULL; + + in_dev_for_each_ifa_rtnl(ifa, in_dev) {} +],[ + AC_DEFINE(HAVE_IN_DEV_FOR_EACH_IFA_RTNL, 1, + ['in_dev_for_each_ifa_rtnl' is defined]) +]) +EXTRA_KCFLAGS="$tmp_flags" +]) # LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL + +# # LN_IB_DEVICE_OPS_EXISTS # # kernel 5.0 commit 521ed0d92ab0db3edd17a5f4716b7f698f4fce61 @@ -844,6 +871,8 @@ LN_CONFIG_SOCK_CREATE_KERN LN_CONFIG_SOCK_ACCEPT # 4.17 LN_CONFIG_SOCK_GETNAME +# 5.3 and 4.18.0-193.el8 +LN_HAVE_IN_DEV_FOR_EACH_IFA_RTNL ]) # LN_PROG_LINUX # diff --git a/lnet/lnet/config.c b/lnet/lnet/config.c index f0ba35b..df3079f 100644 --- a/lnet/lnet/config.c +++ b/lnet/lnet/config.c @@ -1606,11 +1606,12 @@ lnet_match_networks (char **networksp, char *ip2nets, __u32 *ipaddrs, int nip) } /* * kernel 5.3: commit ef11db3310e272d3d8dbe8739e0770820dd20e52 + * kernel 4.18.0-193.el8: * added in_dev_for_each_ifa_rtnl and in_dev_for_each_ifa_rcu * and removed for_ifa and endfor_ifa. * Use the _rntl variant as the current locking is rtnl. */ -#ifdef in_dev_for_each_ifa_rtnl +#ifdef HAVE_IN_DEV_FOR_EACH_IFA_RTNL #define DECLARE_CONST_IN_IFADDR(ifa) const struct in_ifaddr *ifa #define endfor_ifa(in_dev) #else diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 921f263..13113b2 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -30,6 +30,7 @@ TBD Whamcloud 4.14.0-49.13.1.el7a (RHEL7.5) 4.14.0-115.2.2.el7a (RHEL7.6) 4.18.0-147.3.1.el8 (RHEL8.1) + 4.18.0-193.1.2.el8 (RHEL8.2) 4.4.120-92.70 (SLES12 SP2) 4.4.0-142 (Ubuntu 16.04) vanilla linux 4.15.0 (ZFS only) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 58184b7..7529d11 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -3765,6 +3765,7 @@ lustre/doc/Makefile lustre/include/Makefile lustre/include/lustre/Makefile lustre/include/uapi/linux/lustre/Makefile +lustre/kernel_patches/targets/4.18-rhel8.2.target lustre/kernel_patches/targets/4.18-rhel8.1.target lustre/kernel_patches/targets/4.18-rhel8.target lustre/kernel_patches/targets/3.10-rhel7.8.target diff --git a/lustre/kernel_patches/targets/4.18-rhel8.2.target.in b/lustre/kernel_patches/targets/4.18-rhel8.2.target.in new file mode 100644 index 0000000..2f1a56c --- /dev/null +++ b/lustre/kernel_patches/targets/4.18-rhel8.2.target.in @@ -0,0 +1,26 @@ +lnxmaj="4.18.0" +lnxrel="193.1.2.el8_2" + +KERNEL_SRPM=kernel-${lnxmaj}-${lnxrel}.src.rpm +SERIES="" +EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ +LUSTRE_VERSION=@VERSION@ + +DEVEL_PATH_ARCH_DELIMETER="." +OFED_VERSION=inkernel + +BASE_ARCHS="i686 x86_64 ia64 ppc64" +BIGMEM_ARCHS="" +BOOT_ARCHS="" +JENSEN_ARCHS="" +#SMP_ARCHS="i686 x86_64 ia64 ppc64" +# RHEL8 doesn't use smp specific kernels +SMP_ARCHS="" +UP_ARCHS="" + +for cc in gcc ; do + if which $cc >/dev/null 2>/dev/null ; then + export CC=$cc + break + fi +done -- 1.8.3.1