diff options
author | Michael Laß | 2023-09-01 21:02:11 +0200 |
---|---|---|
committer | Michael Laß | 2023-09-01 21:03:47 +0200 |
commit | 4e68ba4b2adc112d3bd74969ff98ed8952d325e1 (patch) | |
tree | e4b32c01e862faec1dfb9b0d884321b923aca23b | |
parent | 0e685ff6d6d114f5d15f7df4b0b36d8ffc01047f (diff) | |
download | aur-4e68ba4b2adc112d3bd74969ff98ed8952d325e1.tar.gz |
Add another patch for Linux 6.5
See https://gerrit.openafs.org/15558/
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | 0001-Linux-6.5-Replace-generic_file_splice_read.patch | 2 | ||||
-rw-r--r-- | 0002-LINUX-Make-sysctl-definitions-more-concise.patch | 2 | ||||
-rw-r--r-- | 0003-Linux-6.5-Use-register_sysctl.patch | 2 | ||||
-rw-r--r-- | 0004-hcrypto-rename-abort-to-_afscrypto_abort.patch | 2 | ||||
-rw-r--r-- | 0005-linux-Replace-fop-iterate-with-fop-iterate_shared.patch | 120 | ||||
-rw-r--r-- | PKGBUILD | 15 |
7 files changed, 140 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = openafs-modules pkgdesc = Kernel module for OpenAFS pkgver = 1.8.10 - pkgrel = 2 + pkgrel = 3 url = http://www.openafs.org install = openafs-modules.install arch = i686 @@ -19,10 +19,12 @@ pkgbase = openafs-modules source = 0002-LINUX-Make-sysctl-definitions-more-concise.patch source = 0003-Linux-6.5-Use-register_sysctl.patch source = 0004-hcrypto-rename-abort-to-_afscrypto_abort.patch + source = 0005-linux-Replace-fop-iterate-with-fop-iterate_shared.patch sha256sums = 9fec11364623549e8db7374072f5c8f01b841f6bfe7e85673cbce35ff43ffb07 - sha256sums = 0d926266a44d210d27564773731086af5da37ea9f541a94077aa82afd0181584 - sha256sums = 132aaa4a55d22756b77c77326b0858215217f9c45e207c891b2b3207d107489c - sha256sums = 349c6335343cad6b2b5dbce85fabb7679522a89e035cdadaa7545de5e7f5dcde - sha256sums = 60c788f28afa589ae7535154efc8c1c7d9a28852e5bb3433878377fee3e522a1 + sha256sums = 81f3cf88040eee89ed180d683ba1a42107ea4a6c7057fd3dac679be9a9a9ab01 + sha256sums = 873c2b3816eed95e1799954d299e4411aa8079f267077dc1a3a3c564d3e2524c + sha256sums = da4b625e6885ae9bccc7428b1556751ea134510540e59fa4e8170cfba4d454dc + sha256sums = 42d2363ac0bcd5e87afc60ac656bb1ead8ab885d0deca6b0f8318b9bbf191b67 + sha256sums = 05a52fcc975b940cf15ba78ec2f76c00580f2db939bea32bcd99ef4c1dfdad1b pkgname = openafs-modules diff --git a/0001-Linux-6.5-Replace-generic_file_splice_read.patch b/0001-Linux-6.5-Replace-generic_file_splice_read.patch index 07a96be3e9ef..2e71324ff79c 100644 --- a/0001-Linux-6.5-Replace-generic_file_splice_read.patch +++ b/0001-Linux-6.5-Replace-generic_file_splice_read.patch @@ -1,7 +1,7 @@ From 04083bc9a31156e34782b689993737f7c9def427 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills <cwills@sinenomine.net> Date: Sun, 9 Jul 2023 18:52:23 -0600 -Subject: [PATCH 1/4] Linux 6.5: Replace generic_file_splice_read +Subject: [PATCH 1/5] Linux 6.5: Replace generic_file_splice_read The Linux 6.5 commit: 'splice: Remove generic_file_splice_read()' (c6585011bc) diff --git a/0002-LINUX-Make-sysctl-definitions-more-concise.patch b/0002-LINUX-Make-sysctl-definitions-more-concise.patch index 78dd66d422c7..9fbe6a757b80 100644 --- a/0002-LINUX-Make-sysctl-definitions-more-concise.patch +++ b/0002-LINUX-Make-sysctl-definitions-more-concise.patch @@ -1,7 +1,7 @@ From 48e0bd7d929fac0cd415c7e8f7886782dcd324ef Mon Sep 17 00:00:00 2001 From: Andrew Deason <adeason@sinenomine.net> Date: Thu, 18 Jul 2019 22:56:48 -0500 -Subject: [PATCH 2/4] LINUX: Make sysctl definitions more concise +Subject: [PATCH 2/5] LINUX: Make sysctl definitions more concise Our sysctl definitions are quite verbose, and adding new ones involves copying a bunch of lines. Make these a little easier to specify, by diff --git a/0003-Linux-6.5-Use-register_sysctl.patch b/0003-Linux-6.5-Use-register_sysctl.patch index 8f51893015a0..aa718cf774c6 100644 --- a/0003-Linux-6.5-Use-register_sysctl.patch +++ b/0003-Linux-6.5-Use-register_sysctl.patch @@ -1,7 +1,7 @@ From aef0016df74fcd3da0f6cb6622d73cd9ceb77358 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills <cwills@sinenomine.net> Date: Thu, 13 Jul 2023 10:54:22 -0600 -Subject: [PATCH 3/4] Linux 6.5: Use register_sysctl() +Subject: [PATCH 3/5] Linux 6.5: Use register_sysctl() The linux 6.5 commit: "sysctl: Remove register_sysctl_table" (b8cbc0855a) diff --git a/0004-hcrypto-rename-abort-to-_afscrypto_abort.patch b/0004-hcrypto-rename-abort-to-_afscrypto_abort.patch index 692702d9232e..c7f9c109b887 100644 --- a/0004-hcrypto-rename-abort-to-_afscrypto_abort.patch +++ b/0004-hcrypto-rename-abort-to-_afscrypto_abort.patch @@ -1,7 +1,7 @@ From 01d7316f6773591186f606de5e3b12de28bb0cd9 Mon Sep 17 00:00:00 2001 From: Cheyenne Wills <cwills@sinenomine.net> Date: Sun, 9 Jul 2023 18:45:15 -0600 -Subject: [PATCH 4/4] hcrypto: rename abort to _afscrypto_abort +Subject: [PATCH 4/5] hcrypto: rename abort to _afscrypto_abort MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0005-linux-Replace-fop-iterate-with-fop-iterate_shared.patch b/0005-linux-Replace-fop-iterate-with-fop-iterate_shared.patch new file mode 100644 index 000000000000..97b367583db3 --- /dev/null +++ b/0005-linux-Replace-fop-iterate-with-fop-iterate_shared.patch @@ -0,0 +1,120 @@ +From fea2bd506b40543d6d9ec862acafb6622fb97ff8 Mon Sep 17 00:00:00 2001 +From: Cheyenne Wills <cwills@sinenomine.net> +Date: Tue, 29 Aug 2023 14:58:10 -0600 +Subject: [PATCH 5/5] linux: Replace fop iterate with fop iterate_shared + +The Linux 6.5 commit: + 'vfs: get rid of old '->iterate' directory operation' (3e32715496) +removed the filesystem_operations iterate method. The replacement +method, iterate_shared, was introduced with the Linux 4.6 commit: + 'introduce a parallel variant of ->iterate()' (6192269444) + +The above commits indicate that the iterate_shared is an "almost" +drop-in replacement for iterate. The vfs documentation for +iterate_shared has caveats on the implementation (serializing in-core +per-inode or per-dentry modifications and using d_alloc_parallel if +doing dcache pre-seeding). A wrapper is provided to assist filesystems +with the migration from iterate to iterate_shared. Until it can be +verified that afs_linux_readdir meets the above requirements, we will +use the wrapper (ref 3e32715496 commit) + +Add configure tests for the iterate_shared file_operations member and +for the wrap_directory_iterator function. + +Update osi_vnodeops.c to use iterate_shared and the wrapper if they are +both available. + +Reviewed-on: https://gerrit.openafs.org/15528 +Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Tested-by: BuildBot <buildbot@rampaginggeek.com> +(cherry picked from commit 7437f4d37719ea53711e06ac9675dad1abd6769e) + +Change-Id: Id00cfab2c0b51c2167fe19cd9cf7f136450ff174 +--- + src/afs/LINUX/osi_vnodeops.c | 19 +++++++++++++++---- + src/cf/linux-kernel-func.m4 | 10 ++++++++++ + src/cf/linux-kernel-struct.m4 | 1 + + 3 files changed, 26 insertions(+), 4 deletions(-) + +diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c +index dd8b39d5d..fb62752e6 100644 +--- a/src/afs/LINUX/osi_vnodeops.c ++++ b/src/afs/LINUX/osi_vnodeops.c +@@ -54,14 +54,16 @@ + # define D_SPLICE_ALIAS_RACE + #endif + ++#if defined(STRUCT_FILE_OPERATIONS_HAS_ITERATE_SHARED) && defined(HAVE_LINUX_WRAP_DIRECTORY_ITERATOR) ++# define USE_FOP_ITERATE 1 ++#elif defined(STRUCT_FILE_OPERATIONS_HAS_ITERATE) && !defined(FMODE_KABI_ITERATE) + /* Workaround for RH 7.5 which introduced file operation iterate() but requires + * each file->f_mode to be marked with FMODE_KABI_ITERATE. Instead OpenAFS will + * continue to use file opearation readdir() in this case. + */ +-#if defined(STRUCT_FILE_OPERATIONS_HAS_ITERATE) && !defined(FMODE_KABI_ITERATE) +-#define USE_FOP_ITERATE 1 ++# define USE_FOP_ITERATE 1 + #else +-#undef USE_FOP_ITERATE ++# undef USE_FOP_ITERATE + #endif + + /* Kernels from before 2.6.19 may not be able to return errors from +@@ -909,10 +911,19 @@ out: + crfree(credp); + return afs_convert_code(code); + } ++#if defined(STRUCT_FILE_OPERATIONS_HAS_ITERATE_SHARED) && defined(HAVE_LINUX_WRAP_DIRECTORY_ITERATOR) ++# if defined(WRAP_DIR_ITER) ++WRAP_DIR_ITER(afs_linux_readdir) /* Adds necessary locking for iterate_shared */ ++# else ++# error the Linux provided macro WRAP_DIR_ITER is not available ++# endif ++#endif + + struct file_operations afs_dir_fops = { + .read = generic_read_dir, +-#if defined(USE_FOP_ITERATE) ++#if defined(STRUCT_FILE_OPERATIONS_HAS_ITERATE_SHARED) && defined(HAVE_LINUX_WRAP_DIRECTORY_ITERATOR) ++ .iterate_shared = shared_afs_linux_readdir, ++#elif defined(USE_FOP_ITERATE) + .iterate = afs_linux_readdir, + #else + .readdir = afs_linux_readdir, +diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4 +index 811954915..145725575 100644 +--- a/src/cf/linux-kernel-func.m4 ++++ b/src/cf/linux-kernel-func.m4 +@@ -225,6 +225,16 @@ AC_CHECK_LINUX_FUNC([register_sysctl], + #include <linux/sysctl.h>], + [(void)register_sysctl(NULL, NULL);]) + ++dnl Linux 6.5 removed the file_operations method 'iterate'. Filesystems should ++dnl using the iterate_shared method (introduced in linux 4.6). Linux 6.4 ++dnl provides a wrapper that can be used for filesystems that haven't fully ++dnl converted to meet the iterate_shared requirements. ++ ++AC_CHECK_LINUX_FUNC([wrap_directory_iterator], ++ [#include <linux/kernel.h> ++ #include <linux/fs.h>], ++ [(void)wrap_directory_iterator(NULL, NULL, NULL);]) ++ + dnl Consequences - things which get set as a result of the + dnl above tests + AS_IF([test "x$ac_cv_linux_func_d_alloc_anon" = "xno"], +diff --git a/src/cf/linux-kernel-struct.m4 b/src/cf/linux-kernel-struct.m4 +index 8082308e8..52e10acb8 100644 +--- a/src/cf/linux-kernel-struct.m4 ++++ b/src/cf/linux-kernel-struct.m4 +@@ -23,6 +23,7 @@ AC_CHECK_LINUX_STRUCT([inode], [i_mutex], [fs.h]) + AC_CHECK_LINUX_STRUCT([inode], [i_security], [fs.h]) + AC_CHECK_LINUX_STRUCT([file], [f_path], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_operations], [flock], [fs.h]) ++AC_CHECK_LINUX_STRUCT([file_operations], [iterate_shared], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_operations], [iterate], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_operations], [read_iter], [fs.h]) + AC_CHECK_LINUX_STRUCT([file_operations], [sendfile], [fs.h]) +-- +2.42.0 + @@ -6,7 +6,7 @@ pkgname=openafs-modules _srcname=openafs pkgver=1.8.10 -pkgrel=2 +pkgrel=3 pkgdesc="Kernel module for OpenAFS" arch=('i686' 'x86_64' 'armv7h') url="http://www.openafs.org" @@ -20,12 +20,14 @@ source=(http://openafs.org/dl/openafs/${pkgver}/${_srcname}-${pkgver}-src.tar.bz 0001-Linux-6.5-Replace-generic_file_splice_read.patch 0002-LINUX-Make-sysctl-definitions-more-concise.patch 0003-Linux-6.5-Use-register_sysctl.patch - 0004-hcrypto-rename-abort-to-_afscrypto_abort.patch) + 0004-hcrypto-rename-abort-to-_afscrypto_abort.patch + 0005-linux-Replace-fop-iterate-with-fop-iterate_shared.patch) sha256sums=('9fec11364623549e8db7374072f5c8f01b841f6bfe7e85673cbce35ff43ffb07' - '0d926266a44d210d27564773731086af5da37ea9f541a94077aa82afd0181584' - '132aaa4a55d22756b77c77326b0858215217f9c45e207c891b2b3207d107489c' - '349c6335343cad6b2b5dbce85fabb7679522a89e035cdadaa7545de5e7f5dcde' - '60c788f28afa589ae7535154efc8c1c7d9a28852e5bb3433878377fee3e522a1') + '81f3cf88040eee89ed180d683ba1a42107ea4a6c7057fd3dac679be9a9a9ab01' + '873c2b3816eed95e1799954d299e4411aa8079f267077dc1a3a3c564d3e2524c' + 'da4b625e6885ae9bccc7428b1556751ea134510540e59fa4e8170cfba4d454dc' + '42d2363ac0bcd5e87afc60ac656bb1ead8ab885d0deca6b0f8318b9bbf191b67' + '05a52fcc975b940cf15ba78ec2f76c00580f2db939bea32bcd99ef4c1dfdad1b') # Heuristic to determine version of installed kernel # You can modify this if the heuristic fails @@ -45,6 +47,7 @@ prepare() { patch -p1 < "${srcdir}"/0002-LINUX-Make-sysctl-definitions-more-concise.patch patch -p1 < "${srcdir}"/0003-Linux-6.5-Use-register_sysctl.patch patch -p1 < "${srcdir}"/0004-hcrypto-rename-abort-to-_afscrypto_abort.patch + patch -p1 < "${srcdir}"/0005-linux-Replace-fop-iterate-with-fop-iterate_shared.patch # Only needed when changes to configure were made ./regen.sh -q |