diff --git a/2.15.57.tar.gz b/2.15.7.tar.gz similarity index 64% rename from 2.15.57.tar.gz rename to 2.15.7.tar.gz index 0d0d1a9b9836fe05d7a3de830bc54f4757d48cc1..4d4e5f1c48fce419a5393619c0b270d4ac126b92 100644 Binary files a/2.15.57.tar.gz and b/2.15.7.tar.gz differ diff --git a/LU-16802-build-iov_iter_iovec-class_create-get_expir.patch b/LU-16802-build-iov_iter_iovec-class_create-get_expir.patch deleted file mode 100644 index d8dd89071f916b0e6c56c87a69090cbf6f6e0722..0000000000000000000000000000000000000000 --- a/LU-16802-build-iov_iter_iovec-class_create-get_expir.patch +++ /dev/null @@ -1,466 +0,0 @@ -From 13bab88098587ad08e5b56450a21f34003eaf6d3 Mon Sep 17 00:00:00 2001 -From: Shaun Tancheff -Date: Tue, 11 Jul 2023 18:41:13 +0700 -Subject: [PATCH] LU-16802 build: iov_iter_iovec, class_create, get_expiry - -linux kernel v6.3-rc4-32-g6eb203e1a868 - iov_iter: remove iov_iter_iovec() - -Provide a replacement iov_iter_iovec() when one is not provided. - -linux kernel v6.3-rc4-34-g747b1f65d39a - iov_iter: overlay struct iovec and ubuf/len - -This renames iov_iter member iov to __iov. -Define __iov as iov when __iov not present. - -linux kernel v6.3-rc1-13-g1aaba11da9aa - driver core: class: remove module * from class_create() - -Provide an ll_class_create() to pass THIS_MODULE, or not, -as needed by class_create(). - -Linux commit v6.2-rc1-20-gf861646a6562 - quota: port to mnt_idmap - -Update osd_dquot_transfer to use mnt_idmap and fallback -to user_ns, if needed, by dquot_transfer. - -Linux commit v6.3-rc7-2433-gcf64b9bce950 - SUNRPC: return proper error from get_expiry() - -Updated get_expiry() requires a time64_t pointer to be passed -to hold the expiry time. A non-zero return value indicates an -error, nominally -EINVAL. Provide a wrapper for kernels that -return a time64_t and return -EINVAL on error. - -Test-Parameters: trivial -HPE-bug-id: LUS-11614 -Signed-off-by: Shaun Tancheff -Change-Id: I765d6257eec8b5a9bf1bd5947f03370eb9df1625 ---- - lustre/autoconf/lustre-core.m4 | 117 +++++++++++++++++++++ - lustre/include/lustre_compat.h | 18 ++-- - lustre/mdc/mdc_request.c | 2 +- - lustre/ofd/ofd_access_log.c | 2 +- - lustre/ptlrpc/gss/gss_svc_upcall.c | 159 +++++++++++++++-------------- - 5 files changed, 213 insertions(+), 85 deletions(-) - -diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 -index b2b9ebcd86..38c3906abf 100644 ---- a/lustre/autoconf/lustre-core.m4 -+++ b/lustre/autoconf/lustre-core.m4 -@@ -3866,6 +3866,111 @@ AC_DEFUN([LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK], [ - ]) - ]) # LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK - -+# -+# LC_HAVE_IOV_ITER_IOVEC -+# -+# linux kernel v6.3-rc4-32-g6eb203e1a868 -+# iov_iter: remove iov_iter_iovec() -+# -+AC_DEFUN([LC_SRC_HAVE_IOV_ITER_IOVEC], [ -+ LB2_LINUX_TEST_SRC([iov_iter_iovec_exists], [ -+ #include -+ ],[ -+ struct iovec iov __attribute__ ((unused)); -+ struct iov_iter i = { }; -+ -+ iov = iov_iter_iovec(&i); -+ ],[-Werror]) -+]) -+AC_DEFUN([LC_HAVE_IOV_ITER_IOVEC], [ -+ AC_MSG_CHECKING([if 'iov_iter_iovec' is available]) -+ LB2_LINUX_TEST_RESULT([iov_iter_iovec_exists], [ -+ AC_DEFINE(HAVE_IOV_ITER_IOVEC, 1, -+ ['iov_iter_iovec' is available]) -+ ]) -+]) # LC_HAVE_IOV_ITER_IOVEC -+ -+# -+# LC_HAVE_IOVEC_WITH_IOV_MEMBER -+# -+# linux kernel v6.3-rc4-34-g747b1f65d39a -+# iov_iter: overlay struct iovec and ubuf/len -+# This renames iov_iter member iov to __iov and now __iov == __ubuf_iovec -+# -+AC_DEFUN([LC_SRC_HAVE_IOVEC_WITH_IOV_MEMBER], [ -+ LB2_LINUX_TEST_SRC([iov_iter_has___iov_member], [ -+ #include -+ ],[ -+ struct iov_iter iter = { }; -+ size_t len __attribute__ ((unused)); -+ -+ len = iter->__iov->iov_len; -+ ],[-Werror]) -+]) -+AC_DEFUN([LC_HAVE_IOVEC_WITH_IOV_MEMBER], [ -+ AC_MSG_CHECKING([if 'iov_iter_iovec' is available]) -+ LB2_LINUX_TEST_RESULT([iov_iter_has___iov_member], [ -+ AC_DEFINE(HAVE___IOV_MEMBER, __iov, -+ ['iov_iter' has '__iov' member]) -+ ],[ -+ AC_DEFINE(__iov, iov, -+ ['iov_iter' has 'iov' member]) -+ ]) -+]) # LC_HAVE_IOVEC_WITH_IOV_MEMBER -+ -+# -+# LC_HAVE_CLASS_CREATE_MODULE_ARG -+# -+# linux kernel v6.3-rc1-13-g1aaba11da9aa -+# driver core: class: remove module * from class_create() -+# -+AC_DEFUN([LC_SRC_HAVE_CLASS_CREATE_MODULE_ARG], [ -+ LB2_LINUX_TEST_SRC([class_create_without_module_arg], [ -+ #include -+ ],[ -+ struct class *class __attribute__ ((unused)); -+ -+ class = class_create("empty"); -+ if (IS_ERR(class)) -+ /* checked */; -+ ],[-Werror]) -+]) -+AC_DEFUN([LC_HAVE_CLASS_CREATE_MODULE_ARG], [ -+ AC_MSG_CHECKING([if 'class_create' does not have module arg]) -+ LB2_LINUX_TEST_RESULT([class_create_without_module_arg], [ -+ AC_DEFINE([ll_class_create(name)], -+ [class_create((name))], -+ ['class_create' does not have module arg]) -+ ],[ -+ AC_DEFINE([ll_class_create(name)], -+ [class_create(THIS_MODULE, (name))], -+ ['class_create' expects module arg]) -+ ]) -+]) # LC_HAVE_IOVEC_WITH_IOV_MEMBER -+ -+# -+# LC_HAVE_GET_EXPIRY_TIME64_T -+# -+# linux kernel v6.3-rc7-2433-gcf64b9bce950 -+# SUNRPC: return proper error from get_expiry() -+# -+AC_DEFUN([LC_SRC_HAVE_GET_EXPIRY_TIME64_T], [ -+ LB2_LINUX_TEST_SRC([get_expiry_with_time64_t], [ -+ #include -+ ],[ -+ int err __attribute__ ((unused)); -+ -+ err = get_expiry((char **)NULL, (time64_t *)NULL); -+ ],[-Werror]) -+]) -+AC_DEFUN([LC_HAVE_GET_EXPIRY_TIME64_T], [ -+ AC_MSG_CHECKING([if 'get_expiry' needs a time64_t arg]) -+ LB2_LINUX_TEST_RESULT([get_expiry_with_time64_t], [ -+ AC_DEFINE(HAVE_GET_EXPIRY_2ARGS, 1, -+ ['get_expiry' takes time64_t]) -+ ]) -+]) # LC_HAVE_IOVEC_WITH_IOV_MEMBER -+ - # - # LC_PROG_LINUX - # -@@ -4116,6 +4221,12 @@ AC_DEFUN([LC_PROG_LINUX_SRC], [ - LC_SRC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK - LC_SRC_HAVE_U64_CAPABILITY - -+ # 6.4 -+ LC_SRC_HAVE_IOV_ITER_IOVEC -+ LC_SRC_HAVE_IOVEC_WITH_IOV_MEMBER -+ LC_SRC_HAVE_CLASS_CREATE_MODULE_ARG -+ LC_SRC_HAVE_GET_EXPIRY_TIME64_T -+ - # kernel patch to extend integrity interface - LC_SRC_BIO_INTEGRITY_PREP_FN - ]) -@@ -4384,6 +4495,12 @@ AC_DEFUN([LC_PROG_LINUX_RESULTS], [ - LC_HAVE_LOCKS_LOCK_FILE_WAIT_IN_FILELOCK - LC_HAVE_U64_CAPABILITY - -+ # 6.4 -+ LC_HAVE_IOV_ITER_IOVEC -+ LC_HAVE_IOVEC_WITH_IOV_MEMBER -+ LC_HAVE_CLASS_CREATE_MODULE_ARG -+ LC_HAVE_GET_EXPIRY_TIME64_T -+ - # kernel patch to extend integrity interface - LC_BIO_INTEGRITY_PREP_FN - ]) -diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h -index 3040cc22ce..c99c8d3730 100644 ---- a/lustre/include/lustre_compat.h -+++ b/lustre/include/lustre_compat.h -@@ -313,20 +313,22 @@ static inline void iov_iter_truncate(struct iov_iter *i, u64 count) - # define SB_NODIRATIME MS_NODIRATIME - #endif - --#ifndef HAVE_FILE_OPERATIONS_READ_WRITE_ITER --static inline void iov_iter_reexpand(struct iov_iter *i, size_t count) --{ -- i->count = count; --} -- -+#ifndef HAVE_IOV_ITER_IOVEC - static inline struct iovec iov_iter_iovec(const struct iov_iter *iter) - { - return (struct iovec) { -- .iov_base = iter->iov->iov_base + iter->iov_offset, -+ .iov_base = iter->__iov->iov_base + iter->iov_offset, - .iov_len = min(iter->count, -- iter->iov->iov_len - iter->iov_offset), -+ iter->__iov->iov_len - iter->iov_offset), - }; - } -+#endif -+ -+#ifndef HAVE_FILE_OPERATIONS_READ_WRITE_ITER -+static inline void iov_iter_reexpand(struct iov_iter *i, size_t count) -+{ -+ i->count = count; -+} - - #define iov_for_each(iov, iter, start) \ - for (iter = (start); \ -diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c -index 086d13e670..2680d941f5 100644 ---- a/lustre/mdc/mdc_request.c -+++ b/lustre/mdc/mdc_request.c -@@ -3037,7 +3037,7 @@ static int __init mdc_init(void) - if (rc) - return rc; - -- mdc_changelog_class = class_create(THIS_MODULE, MDC_CHANGELOG_DEV_NAME); -+ mdc_changelog_class = ll_class_create(MDC_CHANGELOG_DEV_NAME); - if (IS_ERR(mdc_changelog_class)) { - rc = PTR_ERR(mdc_changelog_class); - goto out_dev; -diff --git a/lustre/ofd/ofd_access_log.c b/lustre/ofd/ofd_access_log.c -index 088ec66a2a..1024c08ad1 100644 ---- a/lustre/ofd/ofd_access_log.c -+++ b/lustre/ofd/ofd_access_log.c -@@ -681,7 +681,7 @@ int ofd_access_log_module_init(void) - - oal_log_major = MAJOR(dev); - -- oal_log_class = class_create(THIS_MODULE, LUSTRE_ACCESS_LOG_DIR_NAME); -+ oal_log_class = ll_class_create(LUSTRE_ACCESS_LOG_DIR_NAME); - if (IS_ERR(oal_log_class)) { - rc = PTR_ERR(oal_log_class); - goto out_dev; -diff --git a/lustre/ptlrpc/gss/gss_svc_upcall.c b/lustre/ptlrpc/gss/gss_svc_upcall.c -index ea94cb663f..b82e6f7cb9 100644 ---- a/lustre/ptlrpc/gss/gss_svc_upcall.c -+++ b/lustre/ptlrpc/gss/gss_svc_upcall.c -@@ -71,6 +71,15 @@ - #include "gss_api.h" - #include "gss_crypto.h" - -+#ifndef HAVE_GET_EXPIRY_2ARGS -+static inline int __get_expiry2(char **bpp, time64_t *rvp) -+{ -+ *rvp = get_expiry(bpp); -+ return *rvp ? 0 : -EINVAL; -+} -+#define get_expiry(ps, pt) __get_expiry2((ps), (pt)) -+#endif -+ - #define GSS_SVC_UPCALL_TIMEOUT (20) - - static DEFINE_SPINLOCK(__ctx_index_lock); -@@ -339,13 +348,13 @@ static int rsi_parse(struct cache_detail *cd, char *mesg, int mlen) - * Directly return -EINVAL in this case. - */ - status = -EINVAL; -- goto out; -+ goto out; - } - - rsii.h.flags = 0; - /* expiry */ -- expiry = get_expiry(&mesg); -- if (expiry == 0) -+ status = get_expiry(&mesg, &expiry); -+ if (status) - goto out; - - len = qword_get(&mesg, buf, mlen); -@@ -582,36 +591,36 @@ static struct cache_head * rsc_alloc(void) - - static int rsc_parse(struct cache_detail *cd, char *mesg, int mlen) - { -- char *buf = mesg; -- int len, rv, tmp_int; -- struct rsc rsci, *rscp = NULL; -+ char *buf = mesg; -+ int len, rv, tmp_int; -+ struct rsc rsci, *rscp = NULL; - time64_t expiry; -- int status = -EINVAL; -- struct gss_api_mech *gm = NULL; -+ int status = -EINVAL; -+ struct gss_api_mech *gm = NULL; - -- memset(&rsci, 0, sizeof(rsci)); -+ memset(&rsci, 0, sizeof(rsci)); - -- /* context handle */ -- len = qword_get(&mesg, buf, mlen); -- if (len < 0) goto out; -- status = -ENOMEM; -- if (rawobj_alloc(&rsci.handle, buf, len)) -- goto out; -- -- rsci.h.flags = 0; -- /* expiry */ -- expiry = get_expiry(&mesg); -- status = -EINVAL; -- if (expiry == 0) -- goto out; -- -- /* remote flag */ -- rv = get_int(&mesg, &tmp_int); -- if (rv) { -- CERROR("fail to get remote flag\n"); -- goto out; -- } -- rsci.ctx.gsc_remote = (tmp_int != 0); -+ /* context handle */ -+ len = qword_get(&mesg, buf, mlen); -+ if (len < 0) goto out; -+ status = -ENOMEM; -+ if (rawobj_alloc(&rsci.handle, buf, len)) -+ goto out; -+ -+ rsci.h.flags = 0; -+ /* expiry */ -+ status = get_expiry(&mesg, &expiry); -+ if (status) -+ goto out; -+ -+ status = -EINVAL; -+ /* remote flag */ -+ rv = get_int(&mesg, &tmp_int); -+ if (rv) { -+ CERROR("fail to get remote flag\n"); -+ goto out; -+ } -+ rsci.ctx.gsc_remote = (tmp_int != 0); - - /* root user flag */ - rv = get_int(&mesg, &tmp_int); -@@ -621,41 +630,41 @@ static int rsc_parse(struct cache_detail *cd, char *mesg, int mlen) - } - rsci.ctx.gsc_usr_root = (tmp_int != 0); - -- /* mds user flag */ -- rv = get_int(&mesg, &tmp_int); -- if (rv) { -- CERROR("fail to get mds user flag\n"); -- goto out; -- } -- rsci.ctx.gsc_usr_mds = (tmp_int != 0); -+ /* mds user flag */ -+ rv = get_int(&mesg, &tmp_int); -+ if (rv) { -+ CERROR("fail to get mds user flag\n"); -+ goto out; -+ } -+ rsci.ctx.gsc_usr_mds = (tmp_int != 0); - -- /* oss user flag */ -- rv = get_int(&mesg, &tmp_int); -- if (rv) { -- CERROR("fail to get oss user flag\n"); -- goto out; -- } -- rsci.ctx.gsc_usr_oss = (tmp_int != 0); -+ /* oss user flag */ -+ rv = get_int(&mesg, &tmp_int); -+ if (rv) { -+ CERROR("fail to get oss user flag\n"); -+ goto out; -+ } -+ rsci.ctx.gsc_usr_oss = (tmp_int != 0); - -- /* mapped uid */ -- rv = get_int(&mesg, (int *) &rsci.ctx.gsc_mapped_uid); -- if (rv) { -- CERROR("fail to get mapped uid\n"); -- goto out; -- } -+ /* mapped uid */ -+ rv = get_int(&mesg, (int *) &rsci.ctx.gsc_mapped_uid); -+ if (rv) { -+ CERROR("fail to get mapped uid\n"); -+ goto out; -+ } - -- rscp = rsc_lookup(&rsci); -- if (!rscp) -- goto out; -- -- /* uid, or NEGATIVE */ -- rv = get_int(&mesg, (int *) &rsci.ctx.gsc_uid); -- if (rv == -EINVAL) -- goto out; -- if (rv == -ENOENT) { -- CERROR("NOENT? set rsc entry negative\n"); -+ rscp = rsc_lookup(&rsci); -+ if (!rscp) -+ goto out; -+ -+ /* uid, or NEGATIVE */ -+ rv = get_int(&mesg, (int *) &rsci.ctx.gsc_uid); -+ if (rv == -EINVAL) -+ goto out; -+ if (rv == -ENOENT) { -+ CERROR("NOENT? set rsc entry negative\n"); - set_bit(CACHE_NEGATIVE, &rsci.h.flags); -- } else { -+ } else { - rawobj_t tmp_buf; - time64_t ctx_expiry; - -@@ -699,23 +708,23 @@ static int rsc_parse(struct cache_detail *cd, char *mesg, int mlen) - * We want just the number of seconds into the future. - */ - expiry += ctx_expiry - ktime_get_real_seconds(); -- } -+ } - -- rsci.h.expiry_time = expiry; -- rscp = rsc_update(&rsci, rscp); -- status = 0; -+ rsci.h.expiry_time = expiry; -+ rscp = rsc_update(&rsci, rscp); -+ status = 0; - out: -- if (gm) -- lgss_mech_put(gm); -- rsc_free(&rsci); -- if (rscp) -- cache_put(&rscp->h, &rsc_cache); -- else -- status = -ENOMEM; -+ if (gm) -+ lgss_mech_put(gm); -+ rsc_free(&rsci); -+ if (rscp) -+ cache_put(&rscp->h, &rsc_cache); -+ else -+ status = -ENOMEM; - -- if (status) -- CERROR("parse rsc error %d\n", status); -- return status; -+ if (status) -+ CERROR("parse rsc error %d\n", status); -+ return status; - } - - static struct cache_detail rsc_cache = { --- -2.33.0 - diff --git a/lustre.spec b/lustre.spec index b066313bc524f187b7f4e0c20ccd6597c8f0747e..9d3fcd097370aaf02fb185ac6b54e77916cad34d 100644 --- a/lustre.spec +++ b/lustre.spec @@ -57,7 +57,7 @@ %undefine with_lustre_tests %endif -%{!?version: %global version 2.15.57} +%{!?version: %global version 2.15.7} # if you want a custom kernel version set it variable with $ver.$arch %{!?kver: %global kver %(rpm -q --qf '%%{VERSION}-%%{RELEASE}.%%{ARCH}' `rpm -q kernel-devel | sort -rV|head -n 1`)} # cut epoch for kmodtool @@ -192,7 +192,7 @@ Summary: Lustre File System Name: %{lustre_name} -Version: 2.15.57 +Version: 2.15.7 Release: 1 License: GPL-2.0-only AND LGPL-2.1-or-later %if 0%{?suse_version} >= 1310 @@ -212,10 +212,6 @@ Source9: find-provides Source10: find-provides.ksyms URL: https://wiki.whamcloud.com/ BuildRoot: %{_tmppath}/lustre-%{version}-root - -# patches -Patch1: LU-16802-build-iov_iter_iovec-class_create-get_expir.patch - %if %{with lustre_modules} Requires: %{requires_kmod_name} = %{requires_kmod_version} %endif @@ -245,7 +241,7 @@ BuildRequires: krb5-devel openssl-devel %if %{with lustre_modules} # abuild (auto-build) used by SUSE Open Build Service # need kernel-source as a build requirement, but the code -# which extracts these requirements don't understand %() +# which extracts these requirements don't understand %%() # and treats all such as failures. So the following dance # Allows the requirements to be seen by abuild, but ignored # by lbuild. @@ -517,7 +513,7 @@ export UTILS_CFLAGS="${UTILS_CFLAGS} -D__SANE_USERSPACE_TYPES__=1" # Disable any hardening or annotation since this doesn't make sense for # kernel code, and reset "optflags" so that the vendor's overzealous flags don't # create build failures. -%define optflags -g -O2 -Werror -Wno-stringop-overflow -Wno-format-truncation -Wno-use-after-free +%define optflags -g -O2 -Werror -Wno-stringop-overflow -Wno-format-truncation -Wno-use-after-free -Wno-error=enum-conversion -Wno-error=address %undefine _annotated_build %undefine _hardened_build @@ -547,7 +543,7 @@ fi # inside $CONFIGURE_ARGS # kmod tools/scripts require "name" directory with kernel modules -%if 0%{?rhel} >= 9 +%if 0%{?rhel} >= 9 || 0%{?openEuler} %define _configure eval ./configure %define eval_configure %configure %else @@ -731,7 +727,6 @@ if [ -d $RPM_BUILD_ROOT%{_libdir}/lustre ] ; then fi %endif -echo '%{_prefix}/lib/firewalld/services/*.xml' >>lustre.files %if %{with lustre_modules} # mark modules executable for find-debuginfo.sh find $RPM_BUILD_ROOT/lib/modules -name \*.ko -type f -exec chmod u+x {} \; @@ -809,7 +804,6 @@ echo '%{_libdir}/lustre/tests/lutf/*' >>lustre-tests.files %endif %{_bindir}/llobdstat -%{_bindir}/lljobstat %{_bindir}/llstat %{_bindir}/plot-llstat %{_datadir}/lustre @@ -830,7 +824,7 @@ echo '%{_libdir}/lustre/tests/lutf/*' >>lustre-tests.files %if %{with shared} %{_libdir}/liblustreapi.so.* %endif -%{_udevrulesdir}/99-lustre.rules +%{_sysconfdir}/udev/rules.d/99-lustre.rules %if %{with servers} %{_udevrulesdir}/99-lustre-server.rules %endif @@ -900,15 +894,12 @@ echo '%{_libdir}/lustre/tests/lutf/*' >>lustre-tests.files %{_bindir}/obdfilter-survey %{_bindir}/ost-survey %{_bindir}/sgpdd-survey -%{_bindir}/lst-survey -%{_bindir}/lst.sh %doc lustre-iokit/ior-survey/README.ior-survey %doc lustre-iokit/mds-survey/README.mds-survey %doc lustre-iokit/obdfilter-survey/README.obdfilter-survey %doc lustre-iokit/ost-survey/README.ost-survey %doc lustre-iokit/sgpdd-survey/README.sgpdd-survey %doc lustre-iokit/stats-collect/README.iokit-lstats -%doc lustre-iokit/lst-survey/README.lst-survey %endif %post @@ -931,6 +922,9 @@ rm -rf $RPM_BUILD_ROOT rm -rf %{_tmppath}/kmp %changelog +* Tue Aug 05 2025 Liping Yang - 2.15.7-1 +- Update to 2.15.7 LTS with kernel 6.6 support. + * Thu Aug 03 2023 Xinliang Liu - 2.15.57-1 - Update to 2.15.57 with kernel 6.4 support patch. @@ -943,3 +937,4 @@ rm -rf %{_tmppath}/kmp * Tue Mar 28 2023 Xinliang Liu - 2.15.54-1 - Initial RPM release, client support, with kernel 6.1 client patches +