Accepting request 1042282 from home:hauky:branches:filesystems

- update to openafs-1.8.9pre2
- remove obsolete patches:
  * 79f03c2.diff

OBS-URL: https://build.opensuse.org/request/show/1042282
OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=98
This commit is contained in:
Christof Hanke 2022-12-12 08:36:34 +00:00 committed by Git OBS Bridge
parent 70be4b62ab
commit 816a373c2d
18 changed files with 229 additions and 192 deletions

View File

@ -1,131 +0,0 @@
From 79f03c2d6714e653cee4aa6af81d6568ad4368b7 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu, 22 Sep 2022 13:04:59 -0600
Subject: [PATCH] Linux-6.0: Replace add_to_page_cache
Linux 6.0 removed the add_to_page_cache function in the Linux commit:
'filemap: Remove add_to_page_cache() and add_to_page_cache_locked()'
(2bb876b58d593d7f2522ec0f41f20a74fde76822)
The replacement function, filemap_add_folio function is exported as GPL,
but a non-GPL wrapper was provided in the Linux 5.15 commit:
'mm/filemap: Add filemap_add_folio()'
(9dd3d069406cea073fc633e77bc59abbfde8c6c4)
which changed the GPL exported function add_to_page_cache_lru to a
non-GPL exported function.
The function add_to_page_cache_lru functionally combines the
add_to_page_cache with lru_cache_add. Within afs, all the calls to
add_to_page_cache follow the pattern of calling the lru_cache_add
via the wrapper afs_lru_cache_add immediately after (except in one case
noted below).
Add an autoconf check to see if add_to_page_cache_lru is available.
Introduce a new wrapper function afs_add_to_page_cache_lru that handles
calling either add_to_page_cache/afs_lru_cache_add or
add_to_page_cache_lru.
As noted above there is one function, afs_linux_bypass_readpages, that
calls add_to_page_cache but does not immediately call afs_lru_cache_add.
This function is only used in Linux kernels prior to 5.18, see the
commit:
'Linux-5.18: replace readpages with readahead' (7a181415db)
Since this code path is only built for a Linux kernel level where
add_to_page_cache should also exists, we do not replace this call.
NOTE:
The add_to_page_cache_lru was moved into mm/folio-compat.c which has a
comment indicating that callers of these functions should migrate to
folio calls. However the replacement folio call that is needed by afs,
filemap_add_folio, is exported as GPL.
Reviewed-on: https://gerrit.openafs.org/15132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 0ce315f0cee1cff7e19e6ebcc0e0e82e03719c20)
Change-Id: Ic0496c2fba00e7be467dbbcf52d9854495e1ad9f
---
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 621e4da..bec30bb 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -148,6 +148,23 @@
}
#endif /* !HAVE_LINUX_LRU_ADD_FILE */
+static inline int
+afs_add_to_page_cache_lru(struct afs_lru_pages *alrupages, struct page *page,
+ struct address_space *mapping,
+ pgoff_t index, gfp_t gfp)
+{
+#if defined(HAVE_LINUX_ADD_TO_PAGE_CACHE_LRU)
+ return add_to_page_cache_lru(page, mapping, index, gfp);
+#else
+ int code;
+ code = add_to_page_cache(page, mapping, index, gfp);
+ if (code == 0) {
+ afs_lru_cache_add(alrupages, page);
+ }
+ return code;
+#endif
+}
+
/* This function converts a positive error code from AFS into a negative
* code suitable for passing into the Linux VFS layer. It checks that the
* error code is within the permissable bounds for the ERR_PTR mechanism.
@@ -2269,12 +2286,11 @@
goto out;
}
- code = add_to_page_cache(newpage, cachemapping,
- pageindex, GFP_KERNEL);
+ code = afs_add_to_page_cache_lru(alrupages, newpage, cachemapping,
+ pageindex, GFP_KERNEL);
if (code == 0) {
cachepage = newpage;
newpage = NULL;
- afs_lru_cache_add(alrupages, cachepage);
} else {
put_page(newpage);
newpage = NULL;
@@ -3092,11 +3108,9 @@
goto out;
}
- if (tdc && !add_to_page_cache(page, mapping, page->index,
- GFP_KERNEL)) {
- afs_lru_cache_add(&lrupages, page);
-
- /* Note that add_to_page_cache() locked 'page'.
+ if (tdc && !afs_add_to_page_cache_lru(&lrupages, page, mapping, page->index,
+ GFP_KERNEL)) {
+ /* Note that afs_add_to_page_cache_lru() locks the 'page'.
* afs_linux_read_cache() is guaranteed to handle unlocking it. */
afs_linux_read_cache(cacheFp, page, tdc->f.chunk, &lrupages, task);
}
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
index 27a1d41..d3abdf9 100644
--- a/src/cf/linux-kernel-func.m4
+++ b/src/cf/linux-kernel-func.m4
@@ -189,6 +189,16 @@
#include <linux/kthread.h>],
[kthread_complete_and_exit(0, 0);])
+dnl Linux 6.0 removed add_to_page_cache. It's replacement, filemap_add_folio,
+dnl was added in 5.15 and is GPL-only, but has a NON-GPL wrapper called
+dnl add_to_page_cache_lru.
+dnl Note prior to 5.15, add_to_page_cache_lru was either not exported or
+dnl or exported as GPL-only.
+AC_CHECK_LINUX_FUNC([add_to_page_cache_lru],
+ [#include <linux/kernel.h>
+ #include <linux/pagemap.h>],
+ [add_to_page_cache_lru(NULL, 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"],

147
ChangeLog
View File

@ -1,3 +1,150 @@
commit f812d1125f785df05bf1028f665d22c608006bae
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Nov 3 15:59:04 2022 +0100
Make OpenAFS 1.8.9pre2
Update version strings for the second 1.8.9 prerelease.
Change-Id: Ic45d60180097f85263b2bd81b0beb039c36ad51f
Reviewed-on: https://gerrit.openafs.org/15192
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
commit e8ead732246d7bd9c1e38fa806b19dfd9e38cf6a
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Nov 3 16:11:30 2022 +0100
Update NEWS for 1.8.9pre2
Release notes for the second 1.8.9 prerelease.
Change-Id: I564ee4f4348ca3574a52c75fea30c55dac5e33a4
Reviewed-on: https://gerrit.openafs.org/15193
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
commit fdf38483c7765270c24a01b65fc3d1173509136e
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Thu Sep 22 13:04:59 2022 -0600
Linux-6.0: Replace add_to_page_cache
Linux 6.0 removed the add_to_page_cache function in the Linux commit:
'filemap: Remove add_to_page_cache() and add_to_page_cache_locked()'
(2bb876b58d593d7f2522ec0f41f20a74fde76822)
The replacement function, filemap_add_folio function is exported as GPL,
but a non-GPL wrapper was provided in the Linux 5.15 commit:
'mm/filemap: Add filemap_add_folio()'
(9dd3d069406cea073fc633e77bc59abbfde8c6c4)
which changed the GPL exported function add_to_page_cache_lru to a
non-GPL exported function.
The function add_to_page_cache_lru functionally combines the
add_to_page_cache with lru_cache_add. Within afs, all the calls to
add_to_page_cache follow the pattern of calling the lru_cache_add
via the wrapper afs_lru_cache_add immediately after (except in one case
noted below).
Add an autoconf check to see if add_to_page_cache_lru is available.
Introduce a new wrapper function afs_add_to_page_cache_lru that handles
calling either add_to_page_cache/afs_lru_cache_add or
add_to_page_cache_lru.
As noted above there is one function, afs_linux_bypass_readpages, that
calls add_to_page_cache but does not immediately call afs_lru_cache_add.
This function is only used in Linux kernels prior to 5.18, see the
commit:
'Linux-5.18: replace readpages with readahead' (7a181415db)
Since this code path is only built for a Linux kernel level where
add_to_page_cache should also exists, we do not replace this call.
NOTE:
The add_to_page_cache_lru was moved into mm/folio-compat.c which has a
comment indicating that callers of these functions should migrate to
folio calls. However the replacement folio call that is needed by afs,
filemap_add_folio, is exported as GPL.
Reviewed-on: https://gerrit.openafs.org/15132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 0ce315f0cee1cff7e19e6ebcc0e0e82e03719c20)
Change-Id: Ic0496c2fba00e7be467dbbcf52d9854495e1ad9f
Reviewed-on: https://gerrit.openafs.org/15148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Harish Sharma <Harish.Sharma1@ibm.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
commit 79a04c3448541bd8299598c5d87b404d8d2219a5
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Sep 26 11:34:57 2022 -0400
afs: Avoid unbounded string copy in SRXAFSCB_GetLock()
Use strlcpy() instead of strcpy() when filling in the lock name to avoid
string buffer overflows of the AFSDBLock name arrays.
This is a 1.8.x specific commit, derived from 419f0cd7aa (afs: Replace
strcpy &co by safer alternatives)
Change-Id: Ia59f6dccdeab1c0b6f267254bd264842568b7582
Reviewed-on: https://gerrit.openafs.org/15151
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Harish Sharma <Harish.Sharma1@ibm.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
commit 119cea2f49af08f0f24711d1398a739beef1e359
Author: Cheyenne Wills <cwills@sinenomine.net>
Date: Wed Sep 7 19:03:50 2022 -0600
Remove gssapi in autoconf and configuration
The 1.8.x specific commit in gerrit 12681, "Remove src/rxgk" (7c2ce4040)
removed rxgk from the build, however the probe for GSSAPI is still
place.
If there is no gssapi library available, configure fails:
checking for gss_import_name in -lgssapi_krb5... no
checking for gss_import_name in -lgss... no
configure: error: cannot find usable GSS-API library
There are no references to gssapi other than the probe in autoconf and
2 defines in src/config/Makefile.config.in
Remove the autoconf check for GSSAPI via the RAA_LIB_GSSAPI call.
Remove the 2 GSSAPI related defines from Makefile.config.in
Update the INSTALL document to remove references to gssapi.
Change-Id: I873e46bfccfbf538740e8bf5e28a3ca8c3cd3744
Reviewed-on: https://gerrit.openafs.org/15137
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
commit a2c1f9dc21b9e17aa8b075e4507f07def3275c2a commit a2c1f9dc21b9e17aa8b075e4507f07def3275c2a
Author: Stephan Wiesand <stephan.wiesand@desy.de> Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Sep 23 20:20:44 2021 +0200 Date: Thu Sep 23 20:20:44 2021 +0200

View File

@ -1,43 +0,0 @@
User-Visible OpenAFS Changes
OpenAFS 1.8.9 (in progress)
All platforms
* Performance improvements (14814 14815 15129)
* Support for building with more recent compilers (14970 14982..14987
14990 14991 15056 15057 15061..15064)
* Build fixes and improvements around the test suite (14879 14880
14909..14911 15133)
* Documentation improvements (14980 15047)
* Improved diagnostics and error messages. In particular, warn when
server processes are started without keys and properly print the
volume transaction flags in "vos status" output (14594 14968)
FreeBSD
* Added support for release 12.3 and further improvements (14878
14920 14921)
Linux clients
* Support mainline kernels up to 5.19 (14942..14944 14989 14945
14946 15058 15065 15094 15095)
* Fixed a potential memory leak (15096)
* Fixed a type cast which could make builds fail against older kernels
(15134)
* In Red Hat packaging, no longer have systemd load the openafs module
during boot (15128)
Most client platforms
* Handle certain failure conditions rather than panicking the system
(14927 15052)

63
RELNOTES-1.8.9pre2 Normal file
View File

@ -0,0 +1,63 @@
User-Visible OpenAFS Changes
OpenAFS 1.8.9 (in progress)
All platforms
* Support for building with more recent compilers (14970 14982..14987
14990 14991 15056 15057 15061..15064)
* Build fixes and improvements around the test suite (14879 14880
14909..14911 15133)
* Removed a vestigial autoconf check for GSSAPI support that could
cause unnecessary configure errors (15137)
* Documentation improvements (14980 15047)
* Improved diagnostics and error messages. In particular, warn when
server processes are started without keys and properly print the
volume transaction flags in "vos status" output (14594 14968)
All server platforms
* Avoid several second delays in some situations when the file server
is breaking callbacks on clients with alternate addresses. Avoid
unnecessary several second delays in some cases during database
quorum processing (14815)
All UNIX/Linux client platforms
* Do not perform DNS SRV/AFSDB record queries when running "fs
getcellstatus", "fs checkservers", and "fs setcell". The DNS
lookups incur network delays and were not needed to process these
commands. (14814)
* Avoid possible string buffer overflows with long cell names (15151)
FreeBSD
* Added support for release 12.3 and further improvements (14878
14920 14921)
Linux clients
* Support mainline kernels up to 6.0 (14942..14944 14989 14945
14946 15058 15065 15094 15095 15148)
* Fixed a potential memory leak (15096)
* Avoid a possible performance penalty during file reads when
the file was opened for both reading and writing (15129)
* Fixed a type cast which could make builds fail against older kernels
(15134)
* In Red Hat packaging, systemd will no longer load the openafs module
during boot (15128)
Most client platforms
* Handle certain failure conditions rather than panicking the system
(14927 15052)

View File

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

View File

@ -1 +0,0 @@
ed561539e89a36a4aae32fcdcdb6d3fb openafs-1.8.9pre1-doc.tar.bz2

View File

@ -1 +0,0 @@
f6576fdbd4796adce3f7ab114c9e34c4cca717924ab02e5d8f2dc5bf0fa93f2e openafs-1.8.9pre1-doc.tar.bz2

View File

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

View File

@ -1 +0,0 @@
d366d6fd5c835c6858738cc6ec37f76c openafs-1.8.9pre1-src.tar.bz2

View File

@ -1 +0,0 @@
3b9d5f646b1efd24ae18ba6be45490bb01b4547725621fb335379f5754c6cb7a openafs-1.8.9pre1-src.tar.bz2

View File

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

View File

@ -0,0 +1 @@
34695fb15df9c7320960939dd586494f openafs-1.8.9pre2-doc.tar.bz2

View File

@ -0,0 +1 @@
999f1fb5493df02359fecbe9e9f5cda580bacf3d333b7443112901d0b8732aac openafs-1.8.9pre2-doc.tar.bz2

View File

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

View File

@ -0,0 +1 @@
1234973bfc9872d4d6f0b4d1998acdd3 openafs-1.8.9pre2-src.tar.bz2

View File

@ -0,0 +1 @@
29006abf9c3163cdc17612bd2ea8ae951981bf1f7714b5c51fb73e0af0674ba3 openafs-1.8.9pre2-src.tar.bz2

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Dec 12 07:40:28 UTC 2022 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
- update to openafs-1.8.9pre2
- remove obsolete patches:
* 79f03c2.diff
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Oct 12 16:19:20 UTC 2022 - Christof Hanke <christof.hanke@mpcdf.mpg.de> Wed Oct 12 16:19:20 UTC 2022 - Christof Hanke <christof.hanke@mpcdf.mpg.de>

View File

@ -57,11 +57,11 @@
# used for %setup only # used for %setup only
# leave upstream tar-balls untouched for integrity checks. # leave upstream tar-balls untouched for integrity checks.
%define upstream_version 1.8.9pre1 %define upstream_version 1.8.9pre2
Name: openafs Name: openafs
Version: 1.8.9~pre1 Version: 1.8.9~pre2
Release: 0 Release: 0
Summary: OpenAFS Distributed File System Summary: OpenAFS Distributed File System
License: IPL-1.0 License: IPL-1.0
@ -103,11 +103,6 @@ Source58: openafs.cacheinfo
Source98: kmp_only.files Source98: kmp_only.files
Source99: openafs.changes Source99: openafs.changes
# PATCH-FIX-UPSTREAM KMP build and gcc
# required patches for Linux-5.18 as mentionend on
# https://wiki.openafs.org/devel/Whiteboard/ (June 2022)
# PATCH-FIX-KMP-BUILDING
Patch1: 79f03c2.diff
# PATCH-FIX-UPSTREAM make configure detect ncurses 6 correctly # PATCH-FIX-UPSTREAM make configure detect ncurses 6 correctly
Patch4: 4cf7a9a.diff Patch4: 4cf7a9a.diff
@ -319,7 +314,6 @@ 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
%patch1 -p1
%patch4 -p1 %patch4 -p1
./regen.sh ./regen.sh