Accepting request 1142226 from home:hauky:branches:filesystems

- update to openafs-1.8.11~pre1 
- remove intermediate patches for newer Linux-kernels:
  * fef2457.diff
  * d15c7ab.diff
  * 63801cf.diff
  * 538f450.diff
  * 6de0a64.diff
  * 5b647bf.diff
  * 6413fdb.diff
  * 4f1d810.diff

OBS-URL: https://build.opensuse.org/request/show/1142226
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=119
This commit is contained in:
Christof Hanke 2024-01-29 11:05:40 +00:00 committed by Git OBS Bridge
parent 5fe09f63e9
commit dfe10ed156
25 changed files with 1826 additions and 4522 deletions

View File

@ -1,84 +0,0 @@
From 4f1d8104d17d2b4e95c7abaf5498db6b80aefa8f Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Mon, 18 Sep 2023 12:23:01 -0600
Subject: [PATCH] Linux 6.6: Pass request_mask to generic_fillattr
The Linux 6.6 commit: "fs: pass the request_mask to generic_fillattr"
(0d72b92883) added an additional parameter to Linux's
generic_fillattr() function.
For openafs, generic_fillattr() is called from the inode_operations
method "getattr", which is implemented in afs_linux_getattr(). The value
for the request_mask parameter is an existing parameter that is passed
to the inode_operations "getattr" method.
Add an autoconf test for 4 parameters to the generic_fillattr function
and update afs_linux_getattr() to pass the request_mask to
generic_fillattr().
Reviewed-on: https://gerrit.openafs.org/15561
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Kailas Zadbuke <kailashsz@in.ibm.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 4fed232b80fb1ad6c0e1dfb42ed8d8e1e6821dd7)
Change-Id: I5cddc56c5e605a6c5e4f7f3691eafec8ca589d2c
Reviewed-on: https://gerrit.openafs.org/15590
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 932fd9d..d5fab97 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1195,7 +1195,11 @@
{
int err = afs_linux_revalidate(path->dentry);
if (!err) {
+# if defined(GENERIC_FILLATTR_TAKES_REQUEST_MASK)
+ generic_fillattr(afs_mnt_idmap, request_mask, path->dentry->d_inode, stat);
+# else
generic_fillattr(afs_mnt_idmap, path->dentry->d_inode, stat);
+# endif
}
return err;
}
diff --git a/src/cf/linux-kernel-assorted.m4 b/src/cf/linux-kernel-assorted.m4
index b3a11bc..49827d5 100644
--- a/src/cf/linux-kernel-assorted.m4
+++ b/src/cf/linux-kernel-assorted.m4
@@ -58,6 +58,7 @@
LINUX_D_INVALIDATE_IS_VOID
LINUX_KERNEL_READ_OFFSET_IS_LAST
LINUX_KEYRING_SEARCH_TAKES_RECURSE
+LINUX_GENERIC_FILLATTR_TAKES_REQUEST_MASK
])
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index 1e4dcaf..3596b6a 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -854,3 +854,16 @@
[define if your keyring_search has the recurse parameter],
[])
])
+
+dnl Linux 6.6 added the 'request_mask' parameter to generic_fillattr.
+AC_DEFUN([LINUX_GENERIC_FILLATTR_TAKES_REQUEST_MASK], [
+ AC_CHECK_LINUX_BUILD([whether generic_fillattr has the request_mask parameter],
+ [ac_cv_linux_func_generic_fillattr_takes_request_mask],
+ [#include <linux/fs.h>],
+ [
+ generic_fillattr(NULL, 0, NULL, NULL);
+ ],
+ [GENERIC_FILLATTR_TAKES_REQUEST_MASK],
+ [define if your generic_fillattr has the request_mask_parameter],
+ [])
+])

View File

@ -1,64 +0,0 @@
From 538f450033a67e251b473ff92238b3124b85fc72 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Sun, 09 Jul 2023 18:45:15 -0600
Subject: [PATCH] hcrypto: rename abort to _afscrypto_abort
The Linux 6.5 commit:
panic: make function declarations visible (d9cdb43189)
added a declaration for abort into panic.h.
When building the Linux kernel module, the build fails with the
following:
src/crypto/hcrypto/kernel/config.h:95:20: error: static declaration of
abort follows non-static declaration
95 | static_inline void abort(void) {osi_Panic("hckernel aborting\n"
);}
| ^~~~~
...
from ./include/linux/wait.h:9,
from /openafs/src/afs/sysincludes.h:118,
from /openafs/src/crypto/hcrypto/kernel/config.h:30:
./include/linux/panic.h:36:6: note: previous declaration of abort
with type void(void)
36 | void abort(void);
| ^~~~~
Update the declaration in hcrypto/kernel/config.h to change the function
name from abort to _afscrypto_abort and use a preprocessor define to
map abort to _afscrypto_abort.
Reviewed-on: https://gerrit.openafs.org/15501
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit c4c16890d9d2829f6bef1ef58feafb30b1d59da3)
Change-Id: I54cc9156b98320d04fe6f7bb595a150d5ba87b49
Reviewed-on: https://gerrit.openafs.org/15523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/crypto/hcrypto/kernel/config.h b/src/crypto/hcrypto/kernel/config.h
index 9623fa9..ea0f60b 100644
--- a/src/crypto/hcrypto/kernel/config.h
+++ b/src/crypto/hcrypto/kernel/config.h
@@ -91,7 +91,13 @@
static_inline pid_t getpid(void) {return 1;};
#endif
static_inline int open(const char *path, int flags, ...) {return -1;}
-static_inline void abort(void) {osi_Panic("hckernel aborting\n");}
+
+#ifdef abort
+# undef abort
+#endif
+#define abort _afscrypto_abort
+static_inline void _afscrypto_abort(void) {osi_Panic("hckernel aborting\n");}
+
static_inline void rk_cloexec(int fd) {}
static_inline ssize_t read(int d, void *buf, size_t nbytes) {return -1;}
static_inline int close(int d) {return -1;}

View File

@ -1,55 +0,0 @@
From 5b647bf17a878271e1ce9882e41663770ee73528 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Wed, 06 Sep 2023 11:41:55 -0600
Subject: [PATCH] LINUX: Pass an array of structs to register_sysctl
The Linux 6.6 commit "sysctl: Add size to register_sysctl" (9edbfe92a0)
renamed the Linux function register_sysctl() to register_sysctl_sz() and
added a size parameter. For backward compatibility, a macro,
register_sysctl, is provided. The macro calculates the size of the
ctl_table being registered and passes the size to register_sysctl_sz.
However, in order to perform the size calculation, an array of ctl_table
structures must be passed as the 2nd parameter.
This change only affects the autoconf test used to determine if Linux
provides register_sysctl.
Update the autoconf test for register_sysctl to use an actual ctl_table
structure for the 2nd parameter instead of a NULL.
Reviewed-on: https://gerrit.openafs.org/15559
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 76879b28798840fa0df441c328ada9667f06b154)
Change-Id: I9209d9fbc4514ab658f373510decfc2e81a5dc5f
Reviewed-on: https://gerrit.openafs.org/15575
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
index 8119549..b913676 100644
--- a/src/cf/linux-kernel-func.m4
+++ b/src/cf/linux-kernel-func.m4
@@ -220,10 +220,13 @@
dnl Linux 6.5 removed the Linux function register_sysctl_table(), which
dnl was deprecated in Linux 6.3 in favor of register_sysctl() which was
dnl introduced in Linux 3.3
+dnl Linux 6.6 changed the function register_sysctl to a macro that requires
+dnl an array of ctl_table structures as its 2nd parameter
AC_CHECK_LINUX_FUNC([register_sysctl],
- [#include <linux/kernel.h>
- #include <linux/sysctl.h>],
- [(void)register_sysctl(NULL, NULL);])
+ [#include <linux/kernel.h>
+ #include <linux/sysctl.h>],
+ [[static struct ctl_table cf_sysctl_table[1];
+ (void)register_sysctl(NULL, cf_sysctl_table);]])
dnl Consequences - things which get set as a result of the
dnl above tests

View File

@ -1,99 +0,0 @@
From 63801cfd1fc06ec3259fcfd67229f3a3c70447ed Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu, 13 Jul 2023 10:54:22 -0600
Subject: [PATCH] Linux 6.5: Use register_sysctl()
The linux 6.5 commit:
"sysctl: Remove register_sysctl_table" (b8cbc0855a)
removed the Linux function register_sysctl_table(). The replacement
function is register_sysctl(), which offers a simpler interface.
Add an autoconf test for the Linux function register_sysctl and add a
call to register_sysctl when available.
Notes:
The Linux function register_sysctl was added in Linux 3.3 with the
commit:
'sysctl: Add register_sysctl for normal sysctl users' (fea478d410)
with a note that it is a simpler interface.
The function register_sysctl_table was marked as deprecated with the
Linux 6.3 commit:
'proc_sysctl: enhance documentation' (1dc8689e4c)
Reviewed-on: https://gerrit.openafs.org/15500
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit fb31d299e6caa015f6288ba9186da6277d3d6a8d)
Change-Id: I60f68f1dd95c32bada7179e98250fd44d7c2ddf3
Reviewed-on: https://gerrit.openafs.org/15522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c
index 894c494..a0a0398 100644
--- a/src/afs/LINUX/osi_sysctl.c
+++ b/src/afs/LINUX/osi_sysctl.c
@@ -79,7 +79,7 @@
.procname = 0
}
};
-
+# if !defined(HAVE_LINUX_REGISTER_SYSCTL)
static struct ctl_table fs_sysctl_table[] = {
{
AFS_SYSCTL_NAME(1)
@@ -91,11 +91,13 @@
.procname = 0
}
};
-
+# endif
int
osi_sysctl_init(void)
{
-# if defined(REGISTER_SYSCTL_TABLE_NOFLAG)
+# if defined(HAVE_LINUX_REGISTER_SYSCTL)
+ afs_sysctl = register_sysctl("afs", afs_sysctl_table);
+# elif defined(REGISTER_SYSCTL_TABLE_NOFLAG)
afs_sysctl = register_sysctl_table(fs_sysctl_table);
# else
afs_sysctl = register_sysctl_table(fs_sysctl_table, 0);
diff --git a/src/cf/linux-kernel-assorted.m4 b/src/cf/linux-kernel-assorted.m4
index 03d5f65..b3a11bc 100644
--- a/src/cf/linux-kernel-assorted.m4
+++ b/src/cf/linux-kernel-assorted.m4
@@ -39,7 +39,9 @@
LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK
LINUX_KEY_ALLOC_NEEDS_CRED
LINUX_INIT_WORK_HAS_DATA
-LINUX_REGISTER_SYSCTL_TABLE_NOFLAG
+dnl Don't bother checking register_sysctl_table if using register_sysctl
+AS_IF([test "x$ac_cv_linux_func_register_sysctl" != "xyes"],
+ [LINUX_REGISTER_SYSCTL_TABLE_NOFLAG])
LINUX_HAVE_DCACHE_LOCK
LINUX_D_COUNT_IS_INT
LINUX_IOP_GETATTR_TAKES_PATH_STRUCT
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
index ee22158..8119549 100644
--- a/src/cf/linux-kernel-func.m4
+++ b/src/cf/linux-kernel-func.m4
@@ -217,6 +217,14 @@
#include <linux/buffer_head.h>],
[block_dirty_folio(NULL, NULL);])
+dnl Linux 6.5 removed the Linux function register_sysctl_table(), which
+dnl was deprecated in Linux 6.3 in favor of register_sysctl() which was
+dnl introduced in Linux 3.3
+AC_CHECK_LINUX_FUNC([register_sysctl],
+ [#include <linux/kernel.h>
+ #include <linux/sysctl.h>],
+ [(void)register_sysctl(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"],

View File

@ -1,97 +0,0 @@
From 6413fdbc913834f2884989e5811841f4ccea2b5f Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu, 05 Oct 2023 14:44:49 -0600
Subject: [PATCH] Linux 6.6: convert to ctime accessor functions
The Linux 6.6 commit "fs: add ctime accessors infrastructure"
(9b6304c1d5) added accessor functions for an inode's ctime member.
A follow on commit "fs: rename i_ctime field to __i_ctime" (13bc244578)
changed the name of the inode member ctime to __i_ctime to indicate it's
a private member.
Add an autoconf test for the ctime accessor function
'inode_set_ctime()'.
Add an afs_inode_set_ctime to LINUX/osi_machdep.h that is either defined
as a macro to Linux's inode_set_ctime, or implements a static inline
function to set a inode's ctime.
Convert the setting of an inode's ctime to use afs_inode_set_ctime().
For more information behind the Linux change, see the commit message
for:
"Merge tag 'v6.6-vfs.ctime'
of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs" (615e95831)
Reviewed-on: https://gerrit.openafs.org/15560
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 072c7934cd1b99052882f02294f7036d422b6cf1)
Conflicts:
src/cf/linux-kernel-func.m4 (context)
Change-Id: I729408d12a7946f5778b036ca7e2c14299f3ce8e
Reviewed-on: https://gerrit.openafs.org/15589
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h
index 2220e05..f9ceb35 100644
--- a/src/afs/LINUX/osi_machdep.h
+++ b/src/afs/LINUX/osi_machdep.h
@@ -118,6 +118,17 @@
}
#endif
+#if defined(HAVE_LINUX_INODE_SET_CTIME)
+# define afs_inode_set_ctime(inode, sec, nsec) inode_set_ctime((inode), (sec), (nsec))
+#else
+static inline void
+afs_inode_set_ctime(struct inode *inode, time64_t sec, long nsec)
+{
+ inode->i_ctime.tv_sec = sec;
+ inode->i_ctime.tv_nsec = nsec;
+}
+#endif
+
#undef gop_lookupname
#define gop_lookupname osi_lookupname
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index fb62752..932fd9d 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1144,8 +1144,7 @@
* any time the sysname list changes.
*/
ip->i_mtime.tv_nsec = afs_sysnamegen;
- ip->i_ctime.tv_sec = vp->va_ctime.tv_sec;
- ip->i_ctime.tv_nsec = 0;
+ afs_inode_set_ctime(ip, vp->va_ctime.tv_sec, 0);
}
/* afs_notify_change
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
index 105e58c..dc26b60 100644
--- a/src/cf/linux-kernel-func.m4
+++ b/src/cf/linux-kernel-func.m4
@@ -238,6 +238,12 @@
#include <linux/fs.h>],
[(void)wrap_directory_iterator(NULL, NULL, NULL);])
+dnl Linux 6.6 requires the use of a getter/setter for accessing a inode's
+dnl ctime member. Test for the setter inode_set_ctime
+AC_CHECK_LINUX_FUNC([inode_set_ctime],
+ [#include <linux/fs.h>],
+ [inode_set_ctime(NULL, 0, 0);])
+
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"],

View File

@ -1,118 +0,0 @@
From 6de0a646036283266e1d4aeb583e426005ca5ad4 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Tue, 29 Aug 2023 14:58:10 -0600
Subject: [PATCH] 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
Reviewed-on: https://gerrit.openafs.org/15558
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index dd8b39d..fb62752 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 @@
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 b913676..105e58c 100644
--- a/src/cf/linux-kernel-func.m4
+++ b/src/cf/linux-kernel-func.m4
@@ -228,6 +228,16 @@
[[static struct ctl_table cf_sysctl_table[1];
(void)register_sysctl(NULL, cf_sysctl_table);]])
+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 ce7037e..2824ec1 100644
--- a/src/cf/linux-kernel-struct.m4
+++ b/src/cf/linux-kernel-struct.m4
@@ -26,6 +26,7 @@
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])

5323
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@ -1,65 +0,0 @@
User-Visible OpenAFS Changes
OpenAFS 1.8.10
All platforms
* Improved error messages and diagnostics (15302 15313)
* Fixes for parallel or out of tree builds (15297..9)
* Fixed "make clean" to remove several artifacts overlooked in the past
(15377)
* Fixed the autoconf check for ncurses to catch libs built with
"--enable-reentrant" (15296)
* Removed the obsolete kdump debugging tool (15315)
* Avoid some more possible string buffer overflows (15240)
All client platforms
* Take the readonly volume offline during "vos convertROtoRW" (15233)
* Updated the CellServDB to the latest version from grand.central.org
(15323)
All UNIX/Linux client platforms
* Trim trailing slashes from paths given to "fs lsmount" and
"fs flushmount" (15242)
* Provide the "-literal" option for the "fs getfid" command, which allows
querying a symlink or mount point rather than the object pointed to
(15235)
* Avoid some potential kernel panics (15295 15324 15331)
AIX
* Improved support for this platform, including releases 7.1, 7.2 and 7.3
(15309 15368..76 15378..86 15403 15422 15424..5 15441..2)
macOS
* Added support for Apple Silicon and macOS releases up to 13 ("Ventura")
(15246 15250..1 15254 15258..64)
* Fixes around signing and notarization of the OpenAFS packages (15255..7)
* Build "afscell" on supported platforms, and only those (15247)
Linux
* Support building for newer distributions and compilers (15266..71
15273..5 15277)
Linux clients
* Support mainline kernels up to 6.4 and distribution kernels
derived from those (15228 15281 15388..9 15410..11)
* Fixes and enhancements around the kernel module build (15229..31 15265)
* Fixed potential cache inconsistencies for symbolic link metadata (15443)

1
RELNOTES-1.8.11pre1 Normal file
View File

@ -0,0 +1 @@
User-Visible OpenAFS Changes

View File

@ -1,312 +0,0 @@
From d15c7ab50c92671052cbe9a93b0440c81156d8aa Mon Sep 17 00:00:00 2001
From: Andrew Deason <adeason@sinenomine.net>
Date: Thu, 18 Jul 2019 22:56:48 -0500
Subject: [PATCH] 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
defining some new preprocessor macros.
Reviewed-on: https://gerrit.openafs.org/13700
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 1b0bb8a7fcbd69d513ed30bb76fd0693d1bd3319)
Change-Id: Ib656634ed956b845c89656069aa297253acce785
Reviewed-on: https://gerrit.openafs.org/15521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c
index 8e7dd70..894c494 100644
--- a/src/afs/LINUX/osi_sysctl.c
+++ b/src/afs/LINUX/osi_sysctl.c
@@ -18,6 +18,8 @@
#include <linux/config.h>
#endif
+#ifdef CONFIG_SYSCTL
+
/* From afs_util.c */
extern afs_int32 afs_md5inum;
@@ -31,206 +33,48 @@
extern afs_int32 afs_pct1;
extern afs_int32 afs_pct2;
-#ifdef CONFIG_SYSCTL
+# ifdef STRUCT_CTL_TABLE_HAS_CTL_NAME
+# ifdef CTL_UNNUMBERED
+# define AFS_SYSCTL_NAME(num) .ctl_name = CTL_UNNUMBERED,
+# else
+# define AFS_SYSCTL_NAME(num) .ctl_name = num,
+# endif
+# else
+# define AFS_SYSCTL_NAME(num)
+# endif
+
+# define AFS_SYSCTL_INT2(num, perms, name, var) { \
+ AFS_SYSCTL_NAME(num) \
+ .procname = name, \
+ .data = &var, \
+ .maxlen = sizeof(var), \
+ .mode = perms, \
+ .proc_handler = &proc_dointvec \
+}
+# define AFS_SYSCTL_INT(num, perms, var) \
+ AFS_SYSCTL_INT2(num, perms, #var, var)
+
static struct ctl_table_header *afs_sysctl = NULL;
static struct ctl_table afs_sysctl_table[] = {
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 1,
-#endif
-#endif
- .procname = "hm_retry_RO",
- .data = &hm_retry_RO,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 2,
-#endif
-#endif
- .procname = "hm_retry_RW",
- .data = &hm_retry_RW,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 3,
-#endif
-#endif
- .procname = "hm_retry_int",
- .data = &hm_retry_int,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 4,
-#endif
-#endif
- .procname = "GCPAGs",
- .data = &afs_gcpags,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 5,
-#endif
-#endif
- .procname = "rx_deadtime",
- .data = &afs_rx_deadtime,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 6,
-#endif
-#endif
- .procname = "bkVolPref",
- .data = &afs_bkvolpref,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 7,
-#endif
-#endif
- .procname = "afs_blocksUsed",
- .data = &afs_blocksUsed,
- .maxlen = sizeof(afs_int32),
- .mode = 0444,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 8,
-#endif
-#endif
- .procname = "afs_blocksUsed_0",
- .data = &afs_blocksUsed_0,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 9,
-#endif
-#endif
- .procname = "afs_blocksUsed_1",
- .data = &afs_blocksUsed_1,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 10,
-#endif
-#endif
- .procname = "afs_blocksUsed_2",
- .data = &afs_blocksUsed_2,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 11,
-#endif
-#endif
- .procname = "afs_pct1",
- .data = &afs_pct1,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 12,
-#endif
-#endif
- .procname = "afs_pct2",
- .data = &afs_pct2,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 13,
-#endif
-#endif
- .procname = "afs_cacheBlocks",
- .data = &afs_cacheBlocks,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
- {
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 14,
-#endif
-#endif
- .procname = "md5inum",
- .data = &afs_md5inum,
- .maxlen = sizeof(afs_int32),
- .mode = 0644,
- .proc_handler = &proc_dointvec
- },
+ AFS_SYSCTL_INT(1, 0644, hm_retry_RO),
+ AFS_SYSCTL_INT(2, 0644, hm_retry_RW),
+ AFS_SYSCTL_INT(3, 0644, hm_retry_int),
+
+ AFS_SYSCTL_INT2(4, 0644, "GCPAGs", afs_gcpags),
+ AFS_SYSCTL_INT2(5, 0644, "rx_deadtime", afs_rx_deadtime),
+ AFS_SYSCTL_INT2(6, 0644, "bkVolPref", afs_bkvolpref),
+
+ AFS_SYSCTL_INT( 7, 0444, afs_blocksUsed),
+ AFS_SYSCTL_INT( 8, 0644, afs_blocksUsed_0),
+ AFS_SYSCTL_INT( 9, 0644, afs_blocksUsed_1),
+ AFS_SYSCTL_INT(10, 0644, afs_blocksUsed_2),
+
+ AFS_SYSCTL_INT( 11, 0644, afs_pct1),
+ AFS_SYSCTL_INT( 12, 0644, afs_pct2),
+ AFS_SYSCTL_INT( 13, 0644, afs_cacheBlocks),
+ AFS_SYSCTL_INT2(14, 0644, "md5inum", afs_md5inum),
+
{
.procname = 0
}
@@ -238,13 +82,7 @@
static struct ctl_table fs_sysctl_table[] = {
{
-#if defined(STRUCT_CTL_TABLE_HAS_CTL_NAME)
-#if defined(CTL_UNNUMBERED)
- .ctl_name = CTL_UNNUMBERED,
-#else
- .ctl_name = 1,
-#endif
-#endif
+ AFS_SYSCTL_NAME(1)
.procname = "afs",
.mode = 0555,
.child = afs_sysctl_table
@@ -257,11 +95,11 @@
int
osi_sysctl_init(void)
{
-#if defined(REGISTER_SYSCTL_TABLE_NOFLAG)
+# if defined(REGISTER_SYSCTL_TABLE_NOFLAG)
afs_sysctl = register_sysctl_table(fs_sysctl_table);
-#else
+# else
afs_sysctl = register_sysctl_table(fs_sysctl_table, 0);
-#endif
+# endif
if (!afs_sysctl)
return -1;

View File

@ -1,61 +0,0 @@
From fef245769366efe8694ddadd1e1f2ed5ef8608f4 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Sun, 09 Jul 2023 18:52:23 -0600
Subject: [PATCH] Linux 6.5: Replace generic_file_splice_read
The Linux 6.5 commit:
'splice: Remove generic_file_splice_read()' (c6585011bc)
replaces the function generic_file_splice_read() with the function
filemap_splice_read().
The Linux function 'filemap_splice_read()' was introduced with the
Linux 6.3 commits:
'splice: Add a func to do a splice from a buffered file without
ITER_PIPE' (07073eb01c)
'splice: Export filemap/direct_splice_read()' (7c8e01ebf2)
With updates in Linux 6.5:
'splice: Fix filemap_splice_read() to use the correct inode'
(c37222082f) -- which fixes a problem in the code.
'splice: Make filemap_splice_read() check s_maxbytes' (83aeff881e)
Due to the fact that there could be problems with splice support prior
to Linux 6.5 (where filemap_splice_read()'s use was expanded to
additional filesystems other than just cifs), we only want to use
'filemap_splice_read()' in Linux 6.5 and later.
The LINUX/osi_vnodeops.c file is updated to use 'filemap_splice_read()',
for Linux 6.5 and later, for the splice_read member of the
file_operations structure.
Reviewed-on: https://gerrit.openafs.org/15486
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 0e06eb78f293bb295b0fe12da24abd8dc1160149)
Change-Id: I3b5436234d275253a37987dc40a522ae8f3cae1e
Reviewed-on: https://gerrit.openafs.org/15520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
---
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index ccec382..dd8b39d 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -960,7 +960,11 @@
# else
.splice_write = generic_file_splice_write,
# endif
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
+ .splice_read = filemap_splice_read,
+# else
.splice_read = generic_file_splice_read,
+# endif
#endif
.release = afs_linux_release,
.fsync = afs_linux_fsync,

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9c3809e8afea017d8af2528f60cf0e0f9fa8454fac86533a3e67221f2eb5fb5d
size 3770320

View File

@ -1 +0,0 @@
b7c71e48198ab210a5be0bb40fcdda1d openafs-1.8.10-doc.tar.bz2

View File

@ -1 +0,0 @@
9c3809e8afea017d8af2528f60cf0e0f9fa8454fac86533a3e67221f2eb5fb5d openafs-1.8.10-doc.tar.bz2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9fec11364623549e8db7374072f5c8f01b841f6bfe7e85673cbce35ff43ffb07
size 14845228

View File

@ -1 +0,0 @@
9e8676d04ff3d95d60eaee5e7429a6bb openafs-1.8.10-src.tar.bz2

View File

@ -1 +0,0 @@
9fec11364623549e8db7374072f5c8f01b841f6bfe7e85673cbce35ff43ffb07 openafs-1.8.10-src.tar.bz2

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:db72ffc092f562d3c3d500b0d9f8541df5c3f83a4d80b32a242773cbfda5b040
size 3807798

View File

@ -0,0 +1 @@
fbb93c3e4e580271d7f134ced201576e ../1.8.11pre1/openafs-1.8.11pre1-doc.tar.bz2

View File

@ -0,0 +1 @@
db72ffc092f562d3c3d500b0d9f8541df5c3f83a4d80b32a242773cbfda5b040 openafs-1.8.11pre1-doc.tar.bz2

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dfdb4bcd79e060180ebfd127d0447eceb716be0fbe07712ee7f9ac1904b42c82
size 15042093

View File

@ -0,0 +1 @@
89602a759c60b491863c0e4c8545b2ea ../1.8.11pre1/openafs-1.8.11pre1-src.tar.bz2

View File

@ -0,0 +1 @@
dfdb4bcd79e060180ebfd127d0447eceb716be0fbe07712ee7f9ac1904b42c82 openafs-1.8.11pre1-src.tar.bz2

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon Jan 29 09:56:45 UTC 2024 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
- update to openafs-1.8.11~pre1
- remove intermediate patches for newer Linux-kernels:
* fef2457.diff
* d15c7ab.diff
* 63801cf.diff
* 538f450.diff
* 6de0a64.diff
* 5b647bf.diff
* 6413fdb.diff
* 4f1d810.diff
-------------------------------------------------------------------
Mon Dec 11 04:58:30 UTC 2023 - Christof Hanke <christof.hanke@mpcdf.mpg.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package openafs
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -57,11 +57,11 @@
# used for %setup only
# leave upstream tar-balls untouched for integrity checks.
%define upstream_version 1.8.10
%define upstream_version 1.8.11pre1
Name: openafs
Version: 1.8.10.1
Version: 1.8.11~pre1
Release: 0
Summary: OpenAFS Distributed File System
License: IPL-1.0
@ -104,15 +104,6 @@ Source98: kmp_only.files
Source99: openafs.changes
# PATCH-FIX-UPSTREAM fix build with kernel 6.5
Patch1: fef2457.diff
Patch2: d15c7ab.diff
Patch3: 63801cf.diff
Patch4: 538f450.diff
Patch6: 6de0a64.diff
# PATCH-FIX-UPSTREAM fix build with kernel 6.6
Patch5: 5b647bf.diff
Patch7: 6413fdb.diff
Patch8: 4f1d810.diff
# PATCH-HANDLE-BACKPORTS
# some kernel-features from 6.5 are apparently in 6.4
Patch99: handle_backports.diff
@ -326,14 +317,6 @@ for src_file in %{S:0} %{S:1}; do
done
%setup -q -n openafs-%{upstream_version} -T -b 0 -b 1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%if 0%{?sle_version} == 150600
%patch99 -p1
%endif