This patch makes changes to support new RHEL 9.5 release
for Lustre client.
Lustre-change: https://review.whamcloud.com/56748
Lustre-commit: TBD (from
a347e8bece92e00af02d5499b092700954c4fb8e)
LU-17243 build: compatibility updates for kernel 6.6
linux kernel v5.19-rc1-4-gc4f135d64382
workqueue: Wrap flush_workqueue() using a macro
linux kernel v6.5-rc1-7-g20bdedafd2f6
workqueue: Warn attempt to flush system-wide workqueues.
If __flush_workqueue(system_wq) is not available fall back to
flush_scheduled_work()
Lustre-change: https://review.whamcloud.com/52908
Lustre-commit:
a0e6d6f7327598d13661bb14098a9f21f2035285
LU-17592 build: compatibility updates for kernel 6.8
Linux commit v6.7-rc1-3-gda549bdd15c2
dentry: switch the lists of children to hlist
Provide trival wrappers to abstract the changed members
Lustre-change: https://review.whamcloud.com/54229
Lustre-commit:
6d27c2c8c72e853a238fd3fc7f42d658188ca02f
Test-Parameters: trivial \
mdtcount=4 mdscount=2 clientdistro=el9.5 testlist=sanity
Test-Parameters: optional clientdistro=el9.5 testgroup=full-part-1
Test-Parameters: optional clientdistro=el9.5 testgroup=full-part-2
Test-Parameters: optional clientdistro=el9.5 testgroup=full-part-3
Change-Id: I1bce12b2b7190bcbd880916049667630aba700c8
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56754
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
rhel-9.2) target="5.14-rhel9.2";;
rhel-9.3) target="5.14-rhel9.3";;
rhel-9.4) target="5.14-rhel9.4";;
+ rhel-9.5) target="5.14-rhel9.5";;
sles11.4) target="$(uname -r | cut -d . -f 1,2)-sles11sp4";;
sles11.3) target="$(uname -r | cut -d . -f 1,2)-sles11sp3";;
sles11*) target="$(uname -r | cut -d . -f 1,2)-sles11";;
void __exit cfs_arch_exit(void)
{
/* exit_libcfs_vfree_atomic */
- flush_scheduled_work();
+ __flush_workqueue(system_wq);
}
int cfs_kernel_write(struct file *filp, const void *buf, size_t count,
vanilla linux 5.4.136 (ZFS + ldiskfs)
* ldiskfs needs an ldiskfs patch series for that kernel, ZFS does not
* Client primary kernels built and tested during release cycle:
+ 5.14.0-503.2.1.el9_5 (RHEL9.5)
5.14.0-427.20.1.el9 (RHEL9.4)
5.14.0-362.24.1.el9 (RHEL9.3)
4.18.0-553.5.1.el8 (RHEL8.10)
]) # LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
#
+# LC_HAVE_FLUSH___WORKQUEUE
+#
+# linux kernel v6.5-rc1-7-g20bdedafd2f6
+# workqueue: Warn attempt to flush system-wide workqueues.
+#
+AC_DEFUN([LC_SRC_HAVE_FLUSH___WORKQUEUE], [
+ LB2_LINUX_TEST_SRC([flush_scheduled_work_warning], [
+ #include <linux/workqueue.h>
+ ],[
+ __flush_workqueue(system_wq);
+ ],[-Werror])
+])
+AC_DEFUN([LC_HAVE_FLUSH___WORKQUEUE], [
+ AC_MSG_CHECKING([if 'flush_scheduled_work()' throws warning])
+ LB2_LINUX_TEST_RESULT([flush_scheduled_work_warning], [
+ AC_DEFINE(HAVE_FLUSH___WORKQUEUE, 1,
+ ['__flush_workqueue(system_wq)' is available])
+ ])
+]) # LC_HAVE_FLUSH___WORKQUEUE
+
+#
+# LC_HAVE_DENTRY_D_CHILDREN
+#
+# Linux commit v6.7-rc1-3-gda549bdd15c2
+# dentry: switch the lists of children to hlist
+#
+AC_DEFUN([LC_SRC_HAVE_DENTRY_D_CHILDREN], [
+ LB2_LINUX_TEST_SRC([dentry_d_children], [
+ #include <linux/dcache.h>
+ ],[
+ struct dentry *dentry = NULL;
+
+ return hlist_empty(&dentry->d_children);
+ ],[-Werror])
+])
+AC_DEFUN([LC_HAVE_DENTRY_D_CHILDREN], [
+ AC_MSG_CHECKING([if sruct dentry has d_children member])
+ LB2_LINUX_TEST_RESULT([dentry_d_children], [
+ AC_DEFINE(HAVE_DENTRY_D_CHILDREN, 1,
+ [sruct dentry has d_children member])
+ ])
+]) # LC_HAVE_DENTRY_D_CHILDREN
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
LC_SRC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
LC_SRC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
+ # 6.6
+ LC_SRC_HAVE_FLUSH___WORKQUEUE
+
+ # 6.8
+ LC_SRC_HAVE_DENTRY_D_CHILDREN
+
# kernel patch to extend integrity interface
LC_SRC_BIO_INTEGRITY_PREP_FN
])
LC_NFS_FILLDIR_USE_CTX_RETURN_BOOL
LC_HAVE_FILEMAP_GET_FOLIOS_CONTIG
+ # 6.6
+ LC_HAVE_FLUSH___WORKQUEUE
+
+ # 6.8
+ LC_HAVE_DENTRY_D_CHILDREN
+
# kernel patch to extend integrity interface
LC_BIO_INTEGRITY_PREP_FN
])
lustre/include/Makefile
lustre/include/lustre/Makefile
lustre/include/uapi/linux/lustre/Makefile
+lustre/kernel_patches/targets/5.14-rhel9.5.target
lustre/kernel_patches/targets/5.14-rhel9.4.target
lustre/kernel_patches/targets/5.14-rhel9.3.target
lustre/kernel_patches/targets/5.14-rhel9.2.target
#include <linux/blkdev.h>
#include <linux/slab.h>
#include <linux/security.h>
+#include <linux/workqueue.h>
#include <libcfs/linux/linux-fs.h>
#include <obd_support.h>
}
#endif
+#ifdef HAVE_DENTRY_D_CHILDREN
+#define d_no_children(dentry) (hlist_empty(&(dentry)->d_children))
+#define d_for_each_child(child, dentry) \
+ hlist_for_each_entry((child), &(dentry)->d_children, d_sib)
+#else
+#define d_no_children(dentry) (list_empty(&(dentry)->d_subdirs))
+#define d_for_each_child(child, dentry) \
+ list_for_each_entry((child), &(dentry)->d_subdirs, d_child)
+#endif
+
#ifndef HAVE_VM_FAULT_T
#define vm_fault_t int
#endif
#endif /* HAVE_READ_CACHE_PAGE_WANTS_FILE */
}
+#ifndef HAVE_FLUSH___WORKQUEUE
+#define __flush_workqueue(wq) flush_scheduled_work()
+#endif
+
#endif /* _LUSTRE_COMPAT_H */
--- /dev/null
+lnxmaj="5.14.0"
+lnxrel="503.2.1.el9_5"
+
+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
d_lustre_invalid(de) ? "deleting" : "keeping",
de, de, de->d_parent, de->d_inode,
d_unhashed((struct dentry *)de) ? "" : "hashed,",
- list_empty(&de->d_subdirs) ? "" : "subdirs");
+ d_no_children(de) ? "" : "subdirs");
if (d_lustre_invalid(de))
RETURN(1);
spin_lock(&dir->i_lock);
hlist_for_each_entry(dentry, &dir->i_dentry, d_alias) {
spin_lock(&dentry->d_lock);
- list_for_each_entry(child, &dentry->d_subdirs, d_child) {
+ d_for_each_child(child, dentry) {
if (child->d_inode)
continue;