SHA256
1
0
forked from pool/openafs

8 Commits

Author SHA256 Message Date
e135b1291b Accepting request 1268384 from filesystems
OBS-URL: https://build.opensuse.org/request/show/1268384
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openafs?expand=0&rev=53
2025-04-10 19:59:55 +00:00
Christof Hanke
945e15c009 - add perl-rpm-packaging to BuildRequires: to resolve
"Have Choice"-Error  for arch ppc64le 
- update to latest git branch stable-1_8_x
- add upstream-patches required for kernel 6.14
  + 4702930f8dd87a6cad1d59ef8c127003fded1f31.patch
    (LINUX: Refactor afs_linux_dentry_revalidate())
  + 0306f3fdac736e15620f5802bdce510d25bb2450.patch 
    (Linux-6.14: Handle dops.d_revalidate with parent)

OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=135
2025-04-10 12:18:55 +00:00
7eaf4bf86a Accepting request 1240464 from filesystems
OBS-URL: https://build.opensuse.org/request/show/1240464
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openafs?expand=0&rev=52
2025-01-27 19:55:48 +00:00
Christof Hanke
4b04ae24c9 - update to latest git branch stable-1_8_x, required to support kernel 6.13
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=133
2025-01-27 09:20:35 +00:00
039ad2d6b2 Accepting request 1233121 from filesystems
OBS-URL: https://build.opensuse.org/request/show/1233121
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openafs?expand=0&rev=51
2024-12-23 15:54:16 +00:00
Christof Hanke
f555479f0c - update to latest git branch stable-1_8_x, required to support kernel 6.12
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=131
2024-12-23 08:16:22 +00:00
adb1a41ded Accepting request 1226440 from filesystems
OBS-URL: https://build.opensuse.org/request/show/1226440
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openafs?expand=0&rev=50
2024-11-26 19:56:11 +00:00
Christof Hanke
d3db42d252 - update to latest git branch stable-1_8_x, includes security update 1.8.13
- change version to openafs-1.8.13.g... since the new stable release is 1.8.13 
- remove patch handle_backports.diff, it is now included upstream 
- remove intermediate patches:
  * 03b280649f5e22ed74c217d7c98c3416a2fa9052: Linux-6.10: remove includes for asm/ia32_unistd.h
  * 0f6a3a402f4a66114da9231032bd68cdc4dee7bc: Linux-6.10: Use filemap_alloc_folio when avail
  * 658942f2791fad5e33ec7542158c16dfc66eed39: Linux-6.10: define a wrapper for vmalloc
  * d8b56f21994ce66d8daebb7d69e792f34c1a19ed: afs: avoid empty-body warning
  * 7097eec17bc01bcfc12c4d299136b2d3b94ec3d7: Linux 6.10: Move 'inline' before func return type

OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=129
2024-11-26 08:10:26 +00:00
18 changed files with 1299 additions and 1875 deletions

View File

@@ -0,0 +1,133 @@
commit 0306f3fdac736e15620f5802bdce510d25bb2450
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Fri Feb 7 11:10:27 2025 -0700
Linux-6.14: Handle dops.d_revalidate with parent
The Linux 6.14 commit:
'5be1fa8abd7b0 Pass parent directory inode and expected name to
->d_revalidate()'
added 2 parameters to the dentry_operations.d_revalidate method. These
new parameters are being provided as a convenience so a filesystem's
d_revalidate function can avoid some boilerplate code for obtaining the
dentry's ->d_parent and ->d_name. The caller ensures that these two
values are stable.
Add a new autoconf test to determine if dentry_operations.d_revalidate
has the new parameters.
Update afs_linux_dentry_revalidate() to accept the new parameters.
Change-Id: I7676ce9ae6ac48e37c8d9fbb3fefc455f80c41e1
Reviewed-on: https://gerrit.openafs.org/16253
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index afd2f8112..82c74c431 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1592,32 +1592,43 @@ dentry_revalidate_common(struct vcache *pvcp, const char *name, struct dentry *d
#endif
}
-#if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
+#if defined(DOP_REVALIDATE_TAKES_PARENT_INODE)
+static int
+afs_linux_dentry_revalidate(struct inode *parent_inode, const struct qstr *name,
+ struct dentry *dp, unsigned int flags)
+{
+ if ((flags & LOOKUP_RCU) != 0) {
+ return -ECHILD;
+ }
+ return dentry_revalidate_common(VTOAFS(parent_inode), name->name, dp);
+}
+#else
+# if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
static int
afs_linux_dentry_revalidate(struct dentry *dp, unsigned int flags)
-#elif defined(DOP_REVALIDATE_TAKES_NAMEIDATA)
+# elif defined(DOP_REVALIDATE_TAKES_NAMEIDATA)
static int
afs_linux_dentry_revalidate(struct dentry *dp, struct nameidata *nd)
-#else
+# else
static int
afs_linux_dentry_revalidate(struct dentry *dp, int flags)
-#endif
+# endif
{
int code;
struct dentry *parent;
-#ifdef LOOKUP_RCU
+# ifdef LOOKUP_RCU
/* We don't support RCU path walking */
-# if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
+# if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
if ((flags & LOOKUP_RCU) != 0) {
return -ECHILD;
}
-# else
+# else
if ((nd->flags & LOOKUP_RCU) != 0) {
return -ECHILD;
}
+# endif
# endif
-#endif
parent = dget_parent(dp);
code = dentry_revalidate_common(VTOAFS(parent->d_inode),
@@ -1626,6 +1637,7 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
return code;
}
+#endif /* DOP_REVALIDATE_TAKES_PARENT_INODE */
static void
afs_dentry_iput(struct dentry *dp, struct inode *ip)
diff --git a/src/cf/linux-kernel-assorted.m4 b/src/cf/linux-kernel-assorted.m4
index 88f9e1897..03459137f 100644
--- a/src/cf/linux-kernel-assorted.m4
+++ b/src/cf/linux-kernel-assorted.m4
@@ -17,6 +17,7 @@ LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA
LINUX_IOP_I_PUT_LINK_TAKES_COOKIE
LINUX_DOP_D_DELETE_TAKES_CONST
LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA
+LINUX_DOP_D_REVALIDATE_TAKES_PARENT_INODE
LINUX_FOP_F_FLUSH_TAKES_FL_OWNER_T
LINUX_FOP_F_FSYNC_TAKES_DENTRY
LINUX_FOP_F_FSYNC_TAKES_RANGE
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index b22930690..c7c0c2318 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -885,3 +885,21 @@ AC_DEFUN([LINUX_FILE_LOCK_CORE], [
[define if file_lock_core exists],
[])
])
+
+dnl linux 6.14 updated dentry_operations.d_revalidate with 2 additional
+dnl parameters, the inode of the parent directory and the name the dentry
+dnl is expected to have. Using these are optional. Both parameters are
+dnl stable.
+AC_DEFUN([LINUX_DOP_D_REVALIDATE_TAKES_PARENT_INODE], [
+ AC_CHECK_LINUX_BUILD([whether dop.d_revalidate takes inode and qstr],
+ [ac_cv_linux_func_d_revalidate_takes_parent_inode],
+ [#include <linux/fs.h>
+ #include <linux/namei.h>
+ static int reval(struct inode *parent_inode, const struct qstr *name,
+ struct dentry *d, unsigned int flags) { return 0; }
+ struct dentry_operations dops;],
+ [dops.d_revalidate = reval;],
+ [DOP_REVALIDATE_TAKES_PARENT_INODE],
+ [define if your dops.d_revalidate takes a parent inode],
+ [-Werror])
+])
\ No newline at end of file

View File

@@ -1,111 +0,0 @@
commit 03b280649f5e22ed74c217d7c98c3416a2fa9052
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Wed Jun 12 13:56:44 2024 -0600
Linux-6.10: remove includes for asm/ia32_unistd.h
The Linux 6.10 commit:
"x86/syscall/compat: Remove ia32_unistd.h" (e2d168328e)
Removed the header ia32_unistd.h since it was just a wrapper for the
unistd_32_ia32.h.
The commit:
"linux-afs-translator-xen-20060731" (29dd792381)
added an ia32_unistd.h include to several files; all were not needed
(as they didn't reference any of the contents from the header file, e.g
_NR_ia32_*).
The commit:
"amd64-hook-ia32-table-20030519" (831e172463)
added an include for ia32_unistd.h to osi_module.c.
A later commit:
"osi-probe-syscall-20050129" (f126dbdbe2)
removed many of the references to defines from ia32_unistd.h, but did
not remove the include for the header.
Currently the only remaining files (linux-kernel-syscall-probe.m4,
LINUX/osi_probe.c and LINUX/osi_syscall.c) continue to reference the
items from ia32_unistd.h, but only when building older kernels that
either don't have LINUX_KEYRING_SUPPORT or when
ENABLE_LINUX_SYSCALL_PROBING is enabled (in both cases, these are only
applicable for older kernels where the asm/ia32_unistd.h file would be
present).
For the files that don't have references (i.e. _NR_ia32_*), we can
simply remove the include for asm/ia32_unistd.h. For the remaining set
of files, we can leave the include for asm/ia32_unistd.h since the code
already has preprocessor conditionals so it's only included for older
Linux kernels where the header file will be present.
We noted above, the include for asm/ia32_unistd.h is already conditional
on the checks for LINUX_KEYRING_SUPPORT and ENABLE_LINUX_SYSCALL_PROBING
so we do not need to add any additional configure checks.
Change-Id: I901b5c0f0ff86272b02f898f3951325533d22f4f
Reviewed-on: https://gerrit.openafs.org/15763
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c
index 3e797745c..d964d8103 100644
--- a/src/afs/LINUX/osi_ioctl.c
+++ b/src/afs/LINUX/osi_ioctl.c
@@ -21,10 +21,6 @@
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX_ENV
-#include <asm/ia32_unistd.h>
-#endif
-
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/sched.h>
diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c
index 8ace127f4..499810cc6 100644
--- a/src/afs/LINUX/osi_module.c
+++ b/src/afs/LINUX/osi_module.c
@@ -21,10 +21,6 @@
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX_ENV
-#include <asm/ia32_unistd.h>
-#endif
-
#include <linux/proc_fs.h>
#include <linux/slab.h>
#include <linux/init.h>
diff --git a/src/afs/LINUX/osi_pag_module.c b/src/afs/LINUX/osi_pag_module.c
index ea3d1bd2c..346108489 100644
--- a/src/afs/LINUX/osi_pag_module.c
+++ b/src/afs/LINUX/osi_pag_module.c
@@ -20,10 +20,6 @@
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX_ENV
-#include <asm/ia32_unistd.h>
-#endif
-
#include <linux/proc_fs.h>
#include <linux/slab.h>
#include <linux/init.h>
diff --git a/src/afs/LINUX/osi_proc.c b/src/afs/LINUX/osi_proc.c
index 9c5a080f0..ad7c695b9 100644
--- a/src/afs/LINUX/osi_proc.c
+++ b/src/afs/LINUX/osi_proc.c
@@ -25,10 +25,6 @@
#include <linux/unistd.h> /* For syscall numbers. */
#include <linux/mm.h>
-#ifdef AFS_AMD64_LINUX_ENV
-# include <asm/ia32_unistd.h>
-#endif
-
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/sched.h>

View File

@@ -1,96 +0,0 @@
commit 0f6a3a402f4a66114da9231032bd68cdc4dee7bc
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Wed Jun 12 14:13:59 2024 -0600
Linux-6.10: Use filemap_alloc_folio when avail
The Linux 6.10 commit:
"mm: remove page_cache_alloc()" (3f2ae4ebd5)
removed the page_cache_alloc(), with a note that callers would be using
filemap_alloc_folio instead.
The function filemap_alloc_folio() was introduced in Linux 5.15 commit:
"mm/filemap: Add filemap_alloc_folio" (bb3c579e25)
Add a configure check for filemap_alloc_folio and update the function
afs_linux_read_cache() to use a wrapper that calls filemap_alloc_folio()
if available otherwise calls page_cache_alloc().
Minor whitespace/style cleanup
Note: The function filemap_alloc_folio() was introduced in Linux 5.15,
so this change affects builds using the Linux kernel 5.15 and later.
Change-Id: Ia17aefc38fe9787e54b315c864da726d610b8bb9
Reviewed-on: https://gerrit.openafs.org/15764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 511b0838f..18809c89f 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -2320,6 +2320,24 @@ mapping_read_page(struct address_space *mapping, struct page *page)
#endif
}
+/*
+ * small compat wrapper for filemap_alloc_folio/page_cache_alloc
+ */
+static struct page *
+afs_page_cache_alloc(struct address_space *cachemapping)
+{
+#if defined(HAVE_LINUX_FILEMAP_ALLOC_FOLIO)
+ struct folio *folio;
+ folio = filemap_alloc_folio(mapping_gfp_mask(cachemapping), 0);
+ if (folio == NULL) {
+ return NULL;
+ }
+ return &folio->page;
+#else
+ return page_cache_alloc(cachemapping);
+#endif
+}
+
/* Populate a page by filling it from the cache file pointed at by cachefp
* (which contains indicated chunk)
* If task is NULL, the page copy occurs syncronously, and the routine
@@ -2358,11 +2376,12 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
pageindex = (offset - AFS_CHUNKTOBASE(chunk)) >> PAGE_SHIFT;
while (cachepage == NULL) {
- cachepage = find_get_page(cachemapping, pageindex);
+ cachepage = find_get_page(cachemapping, pageindex);
if (!cachepage) {
- if (!newpage)
- newpage = page_cache_alloc(cachemapping);
- if (!newpage) {
+ if (newpage == NULL) {
+ newpage = afs_page_cache_alloc(cachemapping);
+ }
+ if (newpage == NULL) {
code = -ENOMEM;
goto out;
}
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
index 93f96f5ad..83ea354b0 100644
--- a/src/cf/linux-kernel-func.m4
+++ b/src/cf/linux-kernel-func.m4
@@ -253,6 +253,16 @@ AC_CHECK_LINUX_FUNC([no_strlcpy],
size_t s;
s = strlcpy(buff);]])
+dnl Linux 5.15 introduced filemap_alloc_folio() as a replacement for
+dnl page_cache_alloc(). page_cache_alloc() was updated to become just a
+dnl wrapper for filemap_alloc_folio().
+dnl Linux 6.10 removed page_cache_alloc().
+AC_CHECK_LINUX_FUNC([filemap_alloc_folio],
+ [#include <linux/kernel.h>
+ #include <linux/pagemap.h>],
+ [[static struct folio *folio;
+ folio = filemap_alloc_folio(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

@@ -0,0 +1,211 @@
commit 4702930f8dd87a6cad1d59ef8c127003fded1f31
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Fri Feb 14 15:18:52 2025 -0700
LINUX: Refactor afs_linux_dentry_revalidate()
The signature for Linux's dentry_operations.d_revalidate method has
undergone several changes, leading to increased use of #if directives in
afs_linux_dentry_revalidate().
To make the code more maintainable for future changes involving the
parent inode and the dentry's name, split out most of our logic in
afs_linux_dentry_revalidate() into a new function,
dentry_revalidate_common(). Keep the logic for getting the parent and
checking for LOOKUP_RCU in the caller, afs_linux_dentry_revalidate().
Written in collaboration with adeason@sinenomine.net.
Change-Id: Ic45ac12fceba8c5ba98d2b9c454ed28c44f3ece2
Reviewed-on: https://gerrit.openafs.org/16258
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 91f7e76be..afd2f8112 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1373,43 +1373,24 @@ check_dentry_race(struct dentry *dp)
}
#endif /* D_SPLICE_ALIAS_RACE */
-/* Validate a dentry. Return 1 if unchanged, 0 if VFS layer should re-evaluate.
- * In kernels 2.2.10 and above, we are passed an additional flags var which
- * may have either the LOOKUP_FOLLOW OR LOOKUP_DIRECTORY set in which case
- * we are advised to follow the entry if it is a link or to make sure that
- * it is a directory. But since the kernel itself checks these possibilities
- * later on, we shouldn't have to do it until later. Perhaps in the future..
+/*
+ * Validate a dentry. Return 1 if unchanged, 0 if VFS layer should re-evaluate.
*
- * The code here assumes that on entry the global lock is not held
+ * @param[in] pvcp vcache for the parent directory containing 'dp'
+ * @param[in] name the name of the directory entry for 'dp'
+ * @param[in] dp the dentry we are checking
*/
static int
-#if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
-afs_linux_dentry_revalidate(struct dentry *dp, unsigned int flags)
-#elif defined(DOP_REVALIDATE_TAKES_NAMEIDATA)
-afs_linux_dentry_revalidate(struct dentry *dp, struct nameidata *nd)
-#else
-afs_linux_dentry_revalidate(struct dentry *dp, int flags)
-#endif
+dentry_revalidate_common(struct vcache *pvcp, const char *name, struct dentry *dp)
{
cred_t *credp = NULL;
- struct vcache *vcp, *pvcp, *tvc = NULL;
- struct dentry *parent;
+ struct vcache *vcp, *tvc = NULL;
int valid;
struct afs_fakestat_state fakestate;
int force_drop = 0;
afs_uint32 parent_dv;
int code = 0;
-#ifdef LOOKUP_RCU
- /* We don't support RCU path walking */
-# if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
- if (flags & LOOKUP_RCU)
-# else
- if (nd->flags & LOOKUP_RCU)
-# endif
- return -ECHILD;
-#endif
-
#ifdef D_SPLICE_ALIAS_RACE
if (check_dentry_race(dp)) {
valid = 0;
@@ -1437,7 +1418,7 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
if (code) {
goto error;
}
- if ((strcmp(dp->d_name.name, ".directory") == 0)) {
+ if ((strcmp(name, ".directory") == 0)) {
tryEvalOnly = 1;
}
if (tryEvalOnly)
@@ -1453,13 +1434,11 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
goto bad_dentry;
}
}
- } else if (vcp->mvstat == AFS_MVSTAT_ROOT && *dp->d_name.name != '/') {
+ } else if (vcp->mvstat == AFS_MVSTAT_ROOT && name[0] != '/') {
osi_Assert(vcp->mvid.parent != NULL);
}
- parent = dget_parent(dp);
- pvcp = VTOAFS(parent->d_inode);
- parent_dv = parent_vcache_dv(parent->d_inode, credp);
+ parent_dv = parent_vcache_dv(AFSTOV(pvcp), credp);
/* If the parent's DataVersion has changed or the vnode
* is longer valid, we need to do a full lookup. VerifyVCache
@@ -1472,7 +1451,7 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
if (credp == NULL) {
credp = crref();
}
- code = afs_lookup(pvcp, (char *)dp->d_name.name, &tvc, credp);
+ code = afs_lookup(pvcp, (char *)name, &tvc, credp);
code = filter_enoent(code);
if (code == ENOENT) {
/* ENOENT is not an error here. */
@@ -1483,7 +1462,6 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
if (code) {
/* We couldn't perform the lookup, so we don't know if the
* dentry is valid or not. */
- dput(parent);
goto error;
}
@@ -1506,19 +1484,16 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
* _not_ okay. Force it to be unhashed, since the given name
* doesn't point to this file anymore.
*/
- dput(parent);
force_drop = 1;
goto bad_dentry;
}
code = afs_CreateAttr(&vattr);
if (code) {
- dput(parent);
goto error;
}
if (afs_getattr(vcp, vattr, credp)) {
- dput(parent);
afs_DestroyAttr(vattr);
code = EIO;
goto error;
@@ -1533,23 +1508,15 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
/* should we always update the attributes at this point? */
/* unlikely--the vcache entry hasn't changed */
- dput(parent);
-
} else {
-
/* 'dp' represents a cached negative lookup. */
- parent = dget_parent(dp);
- pvcp = VTOAFS(parent->d_inode);
- parent_dv = parent_vcache_dv(parent->d_inode, credp);
+ parent_dv = parent_vcache_dv(AFSTOV(pvcp), credp);
if (parent_dv > dp->d_time || !(pvcp->f.states & CStatd)
|| afs_IsDynroot(pvcp)) {
- dput(parent);
goto bad_dentry;
}
-
- dput(parent);
}
good_dentry:
@@ -1625,6 +1592,41 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
#endif
}
+#if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
+static int
+afs_linux_dentry_revalidate(struct dentry *dp, unsigned int flags)
+#elif defined(DOP_REVALIDATE_TAKES_NAMEIDATA)
+static int
+afs_linux_dentry_revalidate(struct dentry *dp, struct nameidata *nd)
+#else
+static int
+afs_linux_dentry_revalidate(struct dentry *dp, int flags)
+#endif
+{
+ int code;
+ struct dentry *parent;
+
+#ifdef LOOKUP_RCU
+ /* We don't support RCU path walking */
+# if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
+ if ((flags & LOOKUP_RCU) != 0) {
+ return -ECHILD;
+ }
+# else
+ if ((nd->flags & LOOKUP_RCU) != 0) {
+ return -ECHILD;
+ }
+# endif
+#endif
+
+ parent = dget_parent(dp);
+ code = dentry_revalidate_common(VTOAFS(parent->d_inode),
+ dp->d_name.name, dp);
+ dput(parent);
+
+ return code;
+}
+
static void
afs_dentry_iput(struct dentry *dp, struct inode *ip)
{

View File

@@ -1,66 +0,0 @@
commit 658942f2791fad5e33ec7542158c16dfc66eed39
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Wed Jun 12 14:16:43 2024 -0600
Linux-6.10: define a wrapper for vmalloc
The Linux 6.10 commit:
"mm: vmalloc: enable memory allocation profiling" (88ae5fb755)
changed vmalloc from a function to a wrapper macro.
This change results in build errors:
"error: implicit declaration of function vmalloc; did you mean
kmalloc? [-Werror=implicit-function-declaration]"
when vmalloc is passed as a parameter to the afs_atomlist_create() and
afs_lhash_create() functions.
Add a little wrapper function around vmalloc() to use for the parameter
to afs_atomlist_create() and afs_lhash_create().
Note: A configure test was not needed for this change since the name
and functionality of Linux's vmalloc did not change.
Change-Id: I69c1da9eea5d1de11c1628bbcef427f81f5c01e1
Reviewed-on: https://gerrit.openafs.org/15765
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
diff --git a/src/afs/LINUX/osi_alloc.c b/src/afs/LINUX/osi_alloc.c
index 86cd0e571..7c4b4a1ca 100644
--- a/src/afs/LINUX/osi_alloc.c
+++ b/src/afs/LINUX/osi_alloc.c
@@ -196,6 +196,15 @@ local_free(void *p, size_t n)
vfree(p);
}
+/*
+ * wrapper for vmalloc(), since vmalloc() may be a macro
+ */
+static void *
+local_vmalloc(size_t size)
+{
+ return vmalloc(size);
+}
+
/* linux_alloc_init(): Initializes the kernel memory allocator. As part
* of this process, it also initializes a pool of osi_linux_mem
* structures as well as the hash table itself.
@@ -209,14 +218,14 @@ linux_alloc_init(void)
/* initiate our pool of osi_linux_mem structs */
al_mem_pool =
afs_atomlist_create(sizeof(struct osi_linux_mem), sizeof(long) * 1024,
- (void *)vmalloc, local_free);
+ local_vmalloc, local_free);
if (!al_mem_pool) {
printf("afs_osi_Alloc: Error in initialization(atomlist_create)\n");
return 0;
}
/* initialize the hash table to hold references to alloc'ed chunks */
- lh_mem_htab = afs_lhash_create(hash_equal, (void *)vmalloc, local_free);
+ lh_mem_htab = afs_lhash_create(hash_equal, local_vmalloc, local_free);
if (!lh_mem_htab) {
printf("afs_osi_Alloc: Error in initialization(lhash_create)\n");
return 0;

View File

@@ -1,51 +0,0 @@
commit 7097eec17bc01bcfc12c4d299136b2d3b94ec3d7
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu Jun 6 10:42:57 2024 -0600
Linux 6.10: Move 'inline' before func return type
With Linux 6.10 commit:
"kbuild: turn on -Wextra by default" (f5982cceb3)
there are additional compiler warnings that can turn
into build errors when --enable-checking is used.
"error: inline is not at beginning of declaration
[-Werror=old-style-declaration]"
The error is due to the return type preceding the "inline" keyword
in function declarations.
Fix the declarations for file_can_read_pages() and
afs_linux_readpage_fastpath() to have the proper ordering of the
static/inline keywords attributes so they precede the return type.
Just a note that the `static` and `inline` keywords must precede a
function's return type.
Change-Id: I3ff9d45c119e70a90faf18fbf6d49fb6b9adcf33
Reviewed-on: https://gerrit.openafs.org/15768
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 18809c89f..c6c3bfe39 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -2443,7 +2443,7 @@ afs_linux_read_cache(struct file *cachefp, struct page *page,
/*
* Return true if the file has a mapping that can read pages
*/
-static int inline
+static inline int
file_can_read_pages(struct file *fp)
{
#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
@@ -2456,7 +2456,7 @@ file_can_read_pages(struct file *fp)
return 0;
}
-static int inline
+static inline int
afs_linux_readpage_fastpath(struct file *fp, struct page *pp, int *codep)
{
loff_t offset = page_offset(pp);

2205
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -1,104 +1,27 @@
Preface: <!--NO-FRAMELESS-->
======== <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3c.org/TR/html4/frameset.dtd">
This is the Release-Notes of the last official release. <html><head>
However, <meta name="verify-v1" content="I/X2Wfxkt50ZaXkdbfIow6iFQIZ71o0o2b6sPTOGmPE=" /><!-- shadow -->
this version is based on the git branch "openafs-stable-1_8_x" <META name="verify-v1" content="THAFicQcPIBMrawRwzaJg3JK8FArpvoecAy5Zx7v9DM=" /><!-- cg2v -->
and thus has additional changes beside the ones for 1.8.11. <META name="verify-v1" content="VMsthPusbXnedJuKjM0/lhH0uzVj79aQ/lPfk2FLXsA=" /><!-- jaltman -->
The reason for this is the compatibility with current Linux-Kernels. <META name="verify-v1" content="fijqhqC5PvhJOATNi4e6h2uSK0v1deFiKXL+yItw/5w=" /><!-- jhutz -->
The ChangeLog gives you all commits applied since then. <title>OpenAFS</title>
The versioning-scheme of these packages is: openafs-$LAST_OFFICIAL_RELEASE.git$DATE_OF_NEWEST_COMMIT <link href="/openafs.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
The package-maintainer. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
User-Visible OpenAFS Changes <script type="text/javascript">
var pageTracker = _gat._getTracker("UA-5995928-1");
OpenAFS 1.8.11 pageTracker._trackPageview();
</script>
All platforms </head>
<frameset cols="265,*" border=0>
* Check Rx RPC call number in incoming packets before allocating new <frame src="/navbar.html" name="navbar">
RPC calls to avoid re-running RPC calls when spurious packets are <frameset rows="170,*" border=0>
received (15562) <frame src="/top.html" scrolling=no name="top">
<frame src="/dl/openafs/1.8.13/RELNOTES-1.8.13" name="openafs_main">
* Fix memory leaks (15516 15517) </frameset>
</frameset>
* Fix build failure when building with _FORTIFY_SOURCE (15518 15519) </html>
* Fix build failures when building with the clang compiler (15540 15541
15547 15548)
* Improve error detection in OpenAFS directories for both clients
and servers (15544 15545 15546)
* Add a Makefile target to build Red Hat RPM packages (15514)
* Add support for custom version numbers in Red Hat RPM packages (15513)
All server platforms
* Fix File Server and Protection Server crashes due to recursive thread
lock bug (15609)
* Fix fileserver crashes during startup (15509 15543)
* The bosserver no longer creates the client configuration directory and
"ThisCell" and "CellServDB" symlinks. The "vos", "pts", and "bos"
commands now read cell configuration from the server cell configuration
directory when the client cell configuration directory is not present.
This change allows server packaging to be independent of client packaging
and removes the need for client configuration artifacts on hosts running
server processes only (15510 15511 15512)
* Print a warning in the volserver log when an older version of a volume
is restored over an existing volume, unless the volume was restored with
"-overwrite full" (15531)
* Print a warning in the bosserver log when the bosserver was not started
in restricted mode (15537)
* Avoid unbounded string copies when looking up volumes by name in
the vlserver (15538)
* Fix off-by-one directory entry name size check in salvager (15598)
All client platforms
* Updated the CellServDB to the latest version from grand.central.org
(15603)
All UNIX/Linux client platforms
* Fix PAG object memory leak which can degrade performance (15506)
* Improve kernel memory reclamation after accessing a large number of
files (15536)
* Improve cache corruption detection and refetch cache entries
when cache entry size mismatches are detected (15532 15533 15535)
* Fix panic in user-space client (libuafs, Fuse client) (15539)
Linux clients
* Add support for Linux 6.7 (15600)
* Add support for Linux 6.6 (15575 15589 15590)
* Add support for Linux 6.5 (15520 15521 15522 15523 15558)
* Fix BUG when directory entry names are longer than 16 characters.
Affects Linux 6.5 or higher built with GCC 13 or higher (15599)
* Invalidate Linux VFS dentry caches in the AFS filesystem when running
"fs flush*" commands. This reduces the need to drop Linux VFS caches
by writing to the "/proc/sys/vm/drop_caches" file when
troubleshooting (15515)
* Fix build failures (15507 15508 15596 15542 15549)
macOS
* Add support for MacOS 14 ("Sonoma") (15602)

View File

@@ -1,76 +0,0 @@
commit d8b56f21994ce66d8daebb7d69e792f34c1a19ed
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Wed Jun 12 14:24:01 2024 -0600
afs: avoid empty-body warning
With Linux 6.10 commit:
"kbuild: turn on -Wextra by default" (f5982cceb3)
there are additional compiler warnings that can turn
into build errors when --enable-checking is used.
"error: suggest braces around empty body in an if
statement [-Werror=empty-body]"
when there is an empty body, e.g.
if (foo)
;
Most cases are due to the macros afs_PutCell and afs_PutServer which are
"empty" macros.
Update the afs_PutCell and afs_PutServer macros so they expand to
do {} while(0)
Add a comment at the definitions for afs_PutCell and afs_PutServer to
document the reason for keeping them.
Add braces to conditionals that have an empty body.
There are no functional changes with this commit.
Change-Id: I359723eb6a19d1c78449902b4f477da131b0fa18
Reviewed-on: https://gerrit.openafs.org/15766
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
diff --git a/src/afs/afs.h b/src/afs/afs.h
index 4bde047e8..621a8a517 100644
--- a/src/afs/afs.h
+++ b/src/afs/afs.h
@@ -349,7 +349,8 @@ struct cell_alias {
char *cell;
};
-#define afs_PutCell(cellp, locktype)
+/* In case someday a counterpart for afs_GetCell is needed */
+#define afs_PutCell(cellp, locktype) do {} while(0)
/* the unixuser flag bit definitions */
#define UHasTokens 1 /* are the st and ct fields valid (ever set)? */
@@ -537,7 +538,8 @@ struct server {
afs_int32 capabilities;
};
-#define afs_PutServer(servp, locktype)
+/* In case someday a counterpart for afs_GetServer is needed */
+#define afs_PutServer(servp, locktype) do {} while(0)
/* structs for some pioctls - these are (or should be)
* also in venus.h
diff --git a/src/afs/afs_cbqueue.c b/src/afs/afs_cbqueue.c
index 2dd633588..11e3aa3f1 100644
--- a/src/afs/afs_cbqueue.c
+++ b/src/afs/afs_cbqueue.c
@@ -139,7 +139,9 @@ afs_DequeueCallback(struct vcache *avc)
debugvc = avc;
if (avc->callsort.prev) {
QRemove(&(avc->callsort));
- } else; /* must have got dequeued in a race */
+ } else {
+ /* must have got dequeued in a race */
+ }
return;
} /* afs_DequeueCallback */

View File

@@ -1,11 +0,0 @@
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -971,7 +971,7 @@
# else
.splice_write = generic_file_splice_write,
# endif
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(6,5,0)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0)
.splice_read = filemap_splice_read,
# else
.splice_read = generic_file_splice_read,

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:20c484ebfcedae2f5c3f7fe3ea5b0b02d7a05c0490ea75c80d255b1fe6e336fd oid sha256:05e7d966cffd6fe72fd6976065200e5573457aa35748874d57eec6ecbed23670
size 3370191 size 3373158

View File

@@ -1 +1 @@
0fa436de034023841082afa08ab08bdf /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-doc.tar.bz2 6cce2b29b2027dcbed7911da86f2f5e5 /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-doc.tar.bz2

View File

@@ -1 +1 @@
20c484ebfcedae2f5c3f7fe3ea5b0b02d7a05c0490ea75c80d255b1fe6e336fd /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-doc.tar.bz2 05e7d966cffd6fe72fd6976065200e5573457aa35748874d57eec6ecbed23670 /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-doc.tar.bz2

View File

@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c7afd3cab43d1dd6078c944cfb97ca2aee622187a5443b97166a3a25384fb01a oid sha256:5088353cec7628b9ab0640e2ab8a228add749669ff3f7567b760ccedda64f830
size 14596525 size 14654297

View File

@@ -1 +1 @@
63de2df7b8b37f9305a12024ed400fb6 /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-src.tar.bz2 c35b8393068ac020d8d0a3baa9ac7fc5 /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-src.tar.bz2

View File

@@ -1 +1 @@
c7afd3cab43d1dd6078c944cfb97ca2aee622187a5443b97166a3a25384fb01a /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-src.tar.bz2 5088353cec7628b9ab0640e2ab8a228add749669ff3f7567b760ccedda64f830 /home/hanke/obs/home:hauky:branches:filesystems/openafs/openafs-stable-1_8_x-src.tar.bz2

View File

@@ -1,3 +1,42 @@
-------------------------------------------------------------------
Wed Apr 9 06:47:28 UTC 2025 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
- add perl-rpm-packaging to BuildRequires: to resolve
"Have Choice"-Error for arch ppc64le
-------------------------------------------------------------------
Wed Apr 9 05:28:26 UTC 2025 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
- update to latest git branch stable-1_8_x
- add upstream-patches required for kernel 6.14
+ 4702930f8dd87a6cad1d59ef8c127003fded1f31.patch
(LINUX: Refactor afs_linux_dentry_revalidate())
+ 0306f3fdac736e15620f5802bdce510d25bb2450.patch
(Linux-6.14: Handle dops.d_revalidate with parent)
-------------------------------------------------------------------
Mon Jan 27 08:28:38 UTC 2025 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
- update to latest git branch stable-1_8_x, required to support kernel 6.13
-------------------------------------------------------------------
Mon Dec 23 07:44:52 UTC 2024 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
- update to latest git branch stable-1_8_x, required to support kernel 6.12
-------------------------------------------------------------------
Mon Nov 25 10:54:35 UTC 2024 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
- update to latest git branch stable-1_8_x, includes security update 1.8.13
- change version to openafs-1.8.13.g... since the new stable release is 1.8.13
- remove patch handle_backports.diff, it is now included upstream
- remove intermediate patches:
* 03b280649f5e22ed74c217d7c98c3416a2fa9052: Linux-6.10: remove includes for asm/ia32_unistd.h
* 0f6a3a402f4a66114da9231032bd68cdc4dee7bc: Linux-6.10: Use filemap_alloc_folio when avail
* 658942f2791fad5e33ec7542158c16dfc66eed39: Linux-6.10: define a wrapper for vmalloc
* d8b56f21994ce66d8daebb7d69e792f34c1a19ed: afs: avoid empty-body warning
* 7097eec17bc01bcfc12c4d299136b2d3b94ec3d7: Linux 6.10: Move 'inline' before func return type
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Aug 14 06:46:15 UTC 2024 - Christof Hanke <christof.hanke@mpcdf.mpg.de> Wed Aug 14 06:46:15 UTC 2024 - Christof Hanke <christof.hanke@mpcdf.mpg.de>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package openafs # spec file for package openafs
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -61,7 +61,7 @@
Name: openafs Name: openafs
Version: 1.8.12.g20240711 Version: 1.8.13.g20250116
Release: 0 Release: 0
Summary: OpenAFS Distributed File System Summary: OpenAFS Distributed File System
License: IPL-1.0 License: IPL-1.0
@@ -103,15 +103,9 @@ Source58: openafs.cacheinfo
Source98: kmp_only.files Source98: kmp_only.files
Source99: openafs.changes Source99: openafs.changes
# PATCH-UPSTREAM required for kernel 6.10 # FIX build of kernel module for version 6.14
Patch1: 03b280649f5e22ed74c217d7c98c3416a2fa9052 Patch01: 4702930f8dd87a6cad1d59ef8c127003fded1f31.patch
Patch2: 0f6a3a402f4a66114da9231032bd68cdc4dee7bc Patch02: 0306f3fdac736e15620f5802bdce510d25bb2450.patch
Patch3: 658942f2791fad5e33ec7542158c16dfc66eed39
Patch4: d8b56f21994ce66d8daebb7d69e792f34c1a19ed
Patch5: 7097eec17bc01bcfc12c4d299136b2d3b94ec3d7
# PATCH-HANDLE-BACKPORTS
# some kernel-features from 6.5 are apparently in 6.4
Patch99: handle_backports.diff
# GENERAL BuildRequires and Requires # GENERAL BuildRequires and Requires
# #
@@ -134,6 +128,9 @@ BuildRequires: libtool
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: swig BuildRequires: swig
%ifarch ppc64le
BuildRequires: perl-rpm-packaging
%endif
Requires(post): %fillup_prereq Requires(post): %fillup_prereq
@@ -323,14 +320,9 @@ for src_file in %{S:0} %{S:1}; do
done done
%setup -q -n openafs-%{upstream_version} -T -b 0 -b 1 %setup -q -n openafs-%{upstream_version} -T -b 0 -b 1
%patch -P 1 -p1
%patch -P 2 -p1 %patch -P 01 -p1
%patch -P 3 -p1 %patch -P 02 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%if 0%{?sle_version} == 150600
%patch -P 99 -p1
%endif
./regen.sh ./regen.sh