Whamcloud - gitweb
LU-15959 kernel: new kernel [SLES15 SP4 5.14.21-150400.24.18.1]
authorJian Yu <yujian@whamcloud.com>
Wed, 24 Aug 2022 05:29:19 +0000 (22:29 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 26 Aug 2022 16:03:59 +0000 (16:03 +0000)
This patch makes changes to support new SLES15 SP4 release
with kernel 5.14.21-150400.24.18.1 for Lustre client.

Lustre-change: https://review.whamcloud.com/47696
Lustre-commit: TBD (from 4bf090b81119d02ed5baa59c6857e2c88a746736)

Test-Parameters: trivial clientdistro=sles15sp4 \
env=SANITY_EXCEPT="27J 101j 244a" testlist=sanity
Test-Parameters: trivial clientdistro=sles15sp3

Change-Id: I0bf548835578163767d2f6a2a5e5bd2b33154871
Co-Authored-By: Minh Diep <mdiep@whamcloud.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/47905
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
12 files changed:
contrib/lbuild/funcs.sh
contrib/lbuild/lbuild
contrib/lbuild/lbuild-sles
contrib/lbuild/lbuild-sles12
contrib/lbuild/lbuild-sles15
lustre.spec.in
lustre/ChangeLog
lustre/autoconf/lustre-core.m4
lustre/kernel_patches/targets/5.14-sles15sp4.target.in [new file with mode: 0644]
lustre/kernel_patches/targets/5.3-sles15sp3.target.in
lustre/llite/vvp_internal.h
lustre/llite/vvp_io.c

index 22b115d..bcd7749 100644 (file)
@@ -202,6 +202,7 @@ autodetect_target() {
         sles15.1) target="$(uname -r | cut -d . -f 1,2)-sles15sp1";;
         sles15.2) target="$(uname -r | cut -d . -f 1,2)-sles15sp2";;
         sles15.3) target="$(uname -r | cut -d . -f 1,2)-sles15sp3";;
+       sles15.4) target="$(uname -r | cut -d . -f 1,2)-sles15sp4";;
           fc18)   target="3.x-fc18";;
              *)   fatal 1 "I don't know what distro $distro is.\nEither update autodetect_target() or use the --target argument.";;
     esac
index 83ddc9a..b9f276c 100755 (executable)
@@ -1421,6 +1421,7 @@ EOF
                mlnx) local DDNTAG=$(echo ${linuxrelease//.${TARGET_ARCH}} | awk -F '_' '{print $2}')
                if ! $RPMBUILD $BUILD_TYPE \
                        ${FIND_REQUIRES:+--define "__find_requires $FIND_REQUIRES"} \
+                       ${MOFED_FLAVOR:+--define "flavors_to_build $MOFED_FLAVOR"} \
                        --define "_topdir ${TOPDIR}" --target ${TARGET_ARCH} \
                        --define "KVERSION ${linuxrelease}" \
                        --define "KMP 1" \
index f09bb98..3d287e3 100644 (file)
@@ -7,7 +7,6 @@ BUILD_GEN+=".2" #LU-3337 add missing build files for sles11sp2 server
 DEVEL_KERNEL_TYPE="default-devel"
 RPM_HELPERS_DIR="/usr/lib/rpm"
 RMAC=$HOME/.rpmmacros
-SUSE_MACROS=/etc/rpm/macros.kernel-source
 
 prepare_and_build_srpm() {
 
@@ -106,10 +105,14 @@ resolve_arch() {
 find_linux_devel_paths() {
        local path="$1"
        local linuxobjpath=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}-obj/$(resolve_arch $TARGET_ARCH $PATCHLESS)/$RPMSMPTYPE
+       local linuxmodpath=$path/lib/modules/${lnxmaj}${lnxmin}-${lnxrel}-$RPMSMPTYPE
 
        LINUX=$path/usr/src/linux-${lnxmaj}${lnxmin}-${lnxrel}
        LINUXOBJ=$path/usr/src/linux-obj/$(resolve_arch $TARGET_ARCH $PATCHLESS)/$RPMSMPTYPE
 
+       # symlink the build and source to the local path instead of system's
+       ln -sf $linuxobjpath $linuxmodpath/build
+       ln -sf $LINUX $linuxmodpath/source
        # symlink the linux-obj to linux-version-obj
        ln -s $linuxobjpath $LINUXOBJ
        # We need to copy the headers from the source to the object tree for
@@ -119,10 +122,8 @@ find_linux_devel_paths() {
        fi
        # We modify %kernel_module_package macro to use the linux obj
        # that lbuild install, not the OS installed /usr/src
-       sed -i -e "/^%kernel_module_package/,/^)}$/d" \
-           -e "/^# A few cross-distro definitions/d" $RMAC
        sed -e "s/\/usr\/src/${path//\//\\/}\/usr\/src/" \
-           -e "s/\/boot/${path//\//\\/}\/boot/" ${SUSE_MACROS} >> $RMAC
+           -e "s/\/boot/${path//\//\\/}\/boot/" ${SUSE_MACROS} > $RMAC
 
        return 0
 }
index 9233bab..92846de 100644 (file)
@@ -8,6 +8,7 @@ BUILD_GEN+=".0"
 # This distro does not support zfs, so define WITH_ZFS
 # use words that make the bash log readable.
 WITH_ZFS="Zfs Not Supported"
+SUSE_MACROS=/etc/rpm/macros.kernel-source
 
 source ${LBUILD_DIR}/lbuild-sles
 
index 8a67932..8d79727 100644 (file)
@@ -8,6 +8,7 @@ BUILD_GEN+=".0"
 # This distro does not support zfs, so define WITH_ZFS
 # use words that make the bash log readable.
 WITH_ZFS="Zfs Not Supported"
+SUSE_MACROS=/usr/lib/rpm/macros.d/macros.kernel-source
 
 source ${LBUILD_DIR}/lbuild-sles
 
@@ -29,6 +30,9 @@ kernel_srpm_location() {
             ;;
         esac
         ;;
+    5.14)
+        kdir=updates-sles15.4-src
+        ;;
     esac
 
     site="http://mgmt/cobbler/repo_mirror/$kdir"
@@ -153,6 +157,9 @@ find_linux_rpm-sles15() {
             ;;
         esac
         ;;
+    5.14)
+        distro=sles15.4
+        ;;
     esac
 
     base_dir=updates-basesystem-$distro-x86_64
index 57534ff..159273f 100644 (file)
@@ -416,7 +416,7 @@ to be used by the Lustre testing framework.
 %package -n lustre-iokit
 Summary: The Lustre IO-Kit is a collection of benchmark tools for a cluster with the Lustre file system.
 Group: Applications/System
-Requires: python2 > 2.2, sg3_utils
+Requires: python3, sg3_utils
 
 %description -n lustre-iokit
 This package includes five tools:
index 1a95023..58af697 100644 (file)
@@ -27,6 +27,7 @@
          4.12.14-197.75       (SLES15 SP1)
          5.3.18-24.96         (SLES15 SP2)
          5.3.18-59.37         (SLES15 SP3)
+         5.14.21-150400.24.18 (SLES15 SP4)
          4.15.0-48            (Ubuntu 18.04)
        * Other clients known to build on these kernels at some point (others may also work):
          3.10.0-862.14.4.el7  (RHEL7.5)
index 1a3dd63..6426cdc 100644 (file)
@@ -3135,6 +3135,7 @@ lustre/kernel_patches/targets/4.12-sles12sp5.target
 lustre/kernel_patches/targets/4.12-sles15sp1.target
 lustre/kernel_patches/targets/5.3-sles15sp2.target
 lustre/kernel_patches/targets/5.3-sles15sp3.target
+lustre/kernel_patches/targets/5.14-sles15sp4.target
 lustre/kernel_patches/targets/3.x-fc18.target
 lustre/ldlm/Makefile
 lustre/fid/Makefile
diff --git a/lustre/kernel_patches/targets/5.14-sles15sp4.target.in b/lustre/kernel_patches/targets/5.14-sles15sp4.target.in
new file mode 100644 (file)
index 0000000..29fa0f6
--- /dev/null
@@ -0,0 +1,37 @@
+lnxmaj="5.14"
+lnxmin=".21"
+lnxrel="150400.24.18"
+# use this when there is an "RPM fix" which means that the name of the
+# (source) RPM has been updated but the version of the kernel inside the
+# RPM is not also updated
+rpmfix=".1"
+
+# this is the delimeter that goes before the "smp" at the end of the version
+# defaults to empty
+FLAVOR_DELIMITER="-"
+
+KERNEL_SRPM=kernel-source-${lnxmaj}${lnxmin}-${lnxrel}${rpmfix}.src.rpm
+SERIES=""
+VERSION=$lnxmaj
+EXTRA_VERSION="${lnxmin#.}-${lnxrel}_lustre.@VERSION@"
+LUSTRE_VERSION=@VERSION@
+
+OFED_VERSION=inkernel
+
+BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
+BIGMEM_ARCHS=""
+BOOT_ARCHS=""
+JENSEN_ARCHS=""
+DEFAULT_ARCHS="i686 x86_64 ia64 ppc64"
+BIGSMP_ARCHS=""
+PSERIES64_ARCHS="ppc"
+UP_ARCHS=""
+SRC_ARCHS=""
+#RPMSMPTYPE="smp"
+
+for cc in gcc ; do
+    if which $cc >/dev/null 2>/dev/null ; then
+        export CC=$cc
+        break
+    fi
+done
index b261523..46212c8 100644 (file)
@@ -17,6 +17,7 @@ EXTRA_VERSION="${lnxmin#.}-${lnxrel}_lustre.@VERSION@"
 LUSTRE_VERSION=@VERSION@
 
 OFED_VERSION=inkernel
+MOFED_FLAVOR=default
 
 BASE_ARCHS="i686 ppc x86_64 ia64 ppc64"
 BIGMEM_ARCHS=""
index 4ff59b7..ae1c3e3 100644 (file)
@@ -301,7 +301,8 @@ struct lu_object *vvp_object_alloc(const struct lu_env *env,
 int vvp_global_init(void);
 void vvp_global_fini(void);
 
-#ifndef HAVE_ACCOUNT_PAGE_DIRTIED_EXPORT
+#if !defined(HAVE_ACCOUNT_PAGE_DIRTIED_EXPORT) || \
+defined(HAVE_KALLSYMS_LOOKUP_NAME)
 extern unsigned int (*vvp_account_page_dirtied)(struct page *page,
                                                struct address_space *mapping);
 #endif
index 323b376..a3497a1 100644 (file)
@@ -1027,6 +1027,16 @@ void vvp_set_pagevec_dirty(struct pagevec *pvec)
        for (i = 0; i < count; i++)
                __set_page_dirty_nobuffers(pvec->pages[i]);
 #else
+       /*
+        * In kernel 5.14.21, kallsyms_lookup_name is defined but
+        * account_page_dirtied is not exported.
+        */
+       if (!vvp_account_page_dirtied) {
+               for (i = 0; i < count; i++)
+                       __set_page_dirty_nobuffers(pvec->pages[i]);
+               goto end;
+       }
+
        for (i = 0; i < count; i++) {
                page = pvec->pages[i];
 
@@ -1076,6 +1086,7 @@ void vvp_set_pagevec_dirty(struct pagevec *pvec)
                /* !PageAnon && !swapper_space */
                __mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
        }
+end:
 #endif
        EXIT;
 }