OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_9pre1-3-gfdf3848
Gerrit Code Review
gerrit@openafs.org
Thu, 3 Nov 2022 10:55:01 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
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>
src/afs/LINUX/osi_vnodeops.c | 30 ++++++++++++++++++++++--------
src/cf/linux-kernel-func.m4 | 10 ++++++++++
2 files changed, 32 insertions(+), 8 deletions(-)
--
OpenAFS Master Repository