Accepting request 997368 from home:hauky:branches:filesystems
- update to current of upstream-branch openafs-stable-1_8_x - apply patches for 15.9: * 05b722d.diff 6348262.diff cc8edf7.diff - remove patches now in openafs-stable-1_8_x * fix_gcc_12_linux_5.18.diff OBS-URL: https://build.opensuse.org/request/show/997368 OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=92
This commit is contained in:
parent
758d3807f5
commit
a77b606a5f
115
05b722d.diff
Normal file
115
05b722d.diff
Normal file
@ -0,0 +1,115 @@
|
||||
From 05b722dd59ad2257986f9ab0739d03a1f4a76ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Tue, 05 Jul 2022 10:33:19 -0600
|
||||
Subject: [PATCH] Linux-5.19: Remove flags from aops->write_begin
|
||||
|
||||
The Linux 5.19 commits:
|
||||
|
||||
fs: Remove aop flags parameter from grab_cache_page_write_begin()
|
||||
(b7446e7c)
|
||||
fs: Remove flags parameter from aops->write_begin (9d6b0cd7)
|
||||
|
||||
removed the flags parameter from the address space operations
|
||||
'write_begin' as well as removing the flags parameter from the Linux
|
||||
function 'grab_cache_page_write_begin'.
|
||||
|
||||
Add an autoconf test to see if grab_cache_page_write_begin takes 2 or
|
||||
3 parameters. Use this as a test to determine if the address space
|
||||
operations 'write_begin' takes a flags parameter.
|
||||
|
||||
Create a version of afs_linux_write_begin that does not take a flags
|
||||
parameter, which also calls grab_cache_page_write_begin without flags.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15041
|
||||
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 52d8df218ff27c139ede221ec4decf593610fc47)
|
||||
|
||||
Change-Id: I20575c2e9d0979749078f4e3d6f862900c6b6561
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
|
||||
index 53a079b..9a080da 100644
|
||||
--- a/src/afs/LINUX/osi_compat.h
|
||||
+++ b/src/afs/LINUX/osi_compat.h
|
||||
@@ -138,7 +138,9 @@
|
||||
#define AOP_WRITEPAGE_ACTIVATE WRITEPAGE_ACTIVATE
|
||||
#endif
|
||||
|
||||
-#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_WRITE_BEGIN) && !defined(HAVE_LINUX_GRAB_CACHE_PAGE_WRITE_BEGIN)
|
||||
+#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_WRITE_BEGIN) && \
|
||||
+ !defined(HAVE_LINUX_GRAB_CACHE_PAGE_WRITE_BEGIN_WITHFLAGS) && \
|
||||
+ !defined(HAVE_LINUX_GRAB_CACHE_PAGE_WRITE_BEGIN_NOFLAGS)
|
||||
static inline struct page *
|
||||
grab_cache_page_write_begin(struct address_space *mapping, pgoff_t index,
|
||||
unsigned int flags) {
|
||||
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
|
||||
index 04f13a1..881d38e 100644
|
||||
--- a/src/afs/LINUX/osi_vnodeops.c
|
||||
+++ b/src/afs/LINUX/osi_vnodeops.c
|
||||
@@ -3480,6 +3480,33 @@
|
||||
return code;
|
||||
}
|
||||
|
||||
+# if defined(HAVE_LINUX_GRAB_CACHE_PAGE_WRITE_BEGIN_NOFLAGS)
|
||||
+static int
|
||||
+afs_linux_write_begin(struct file *file, struct address_space *mapping,
|
||||
+ loff_t pos, unsigned len,
|
||||
+ struct page **pagep, void **fsdata)
|
||||
+{
|
||||
+ struct page *page;
|
||||
+ pgoff_t index = pos >> PAGE_SHIFT;
|
||||
+ unsigned int from = pos & (PAGE_SIZE - 1);
|
||||
+ int code;
|
||||
+
|
||||
+ page = grab_cache_page_write_begin(mapping, index);
|
||||
+ if (!page) {
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ *pagep = page;
|
||||
+
|
||||
+ code = afs_linux_prepare_write(file, page, from, from + len);
|
||||
+ if (code) {
|
||||
+ unlock_page(page);
|
||||
+ put_page(page);
|
||||
+ }
|
||||
+
|
||||
+ return code;
|
||||
+}
|
||||
+# else
|
||||
static int
|
||||
afs_linux_write_begin(struct file *file, struct address_space *mapping,
|
||||
loff_t pos, unsigned len, unsigned flags,
|
||||
@@ -3505,7 +3532,8 @@
|
||||
|
||||
return code;
|
||||
}
|
||||
-#endif
|
||||
+# endif /* HAVE_LINUX_GRAB_CACHE_PAGE_WRITE_BEGIN_NOFLAGS */
|
||||
+#endif /* STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_WRITE_BEGIN */
|
||||
|
||||
#ifndef STRUCT_DENTRY_OPERATIONS_HAS_D_AUTOMOUNT
|
||||
static void *
|
||||
diff --git a/src/cf/linux-kernel-func.m4 b/src/cf/linux-kernel-func.m4
|
||||
index cd4afe9..27a1d41 100644
|
||||
--- a/src/cf/linux-kernel-func.m4
|
||||
+++ b/src/cf/linux-kernel-func.m4
|
||||
@@ -59,9 +59,14 @@
|
||||
AC_CHECK_LINUX_FUNC([generic_file_aio_read],
|
||||
[#include <linux/fs.h>],
|
||||
[generic_file_aio_read(NULL,NULL,0,0);])
|
||||
-AC_CHECK_LINUX_FUNC([grab_cache_page_write_begin],
|
||||
+dnl - linux 5.19 removed the flags parameter, need to test
|
||||
+dnl - with and without the flags parameter
|
||||
+AC_CHECK_LINUX_FUNC([grab_cache_page_write_begin_withflags],
|
||||
[#include <linux/pagemap.h>],
|
||||
[grab_cache_page_write_begin(NULL, 0, 0);])
|
||||
+AC_CHECK_LINUX_FUNC([grab_cache_page_write_begin_noflags],
|
||||
+ [#include <linux/pagemap.h>],
|
||||
+ [grab_cache_page_write_begin(NULL, 0);])
|
||||
AC_CHECK_LINUX_FUNC([hlist_unhashed],
|
||||
[#include <linux/list.h>],
|
||||
[hlist_unhashed(0);])
|
127
6348262.diff
Normal file
127
6348262.diff
Normal file
@ -0,0 +1,127 @@
|
||||
From 6348262b1ef2cdb54f9a9bd6dab78aa8dc1ddac5 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Tue, 05 Jul 2022 11:45:29 -0600
|
||||
Subject: [PATCH] Linux-5.19: Rename aops readpage to read_folio
|
||||
|
||||
With Linux commits:
|
||||
mm,fs: Remove aops->readpage (7e0a126519)
|
||||
fs: Introduce aops->read_folio (5efe7448a1)
|
||||
|
||||
the address space operations method 'readpage' was replaced with
|
||||
read_folio. The operation behaves the same, except instead of taking a
|
||||
struct page parameter, the new function takes a folio structure.
|
||||
|
||||
Add an autoconf test for the address space operation entry read_folio
|
||||
|
||||
Replace the references to an address space operations' readpage with
|
||||
read_folio. Note that the function Linux page_folio can be used to
|
||||
obtain the required pointer to the folio for a given page.
|
||||
|
||||
Introduce afs_linux_read_folio that accepts a folio and calls
|
||||
afs_linux_readpage with the page associated with that folio.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15040
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
(cherry picked from commit bfb852197edcbe0c38c499faecd7c1be23308a20)
|
||||
|
||||
Change-Id: Iab96bd10a143d88fe37ac8aa8980b33339c76852
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
|
||||
index b834a40..04f13a1 100644
|
||||
--- a/src/afs/LINUX/osi_vnodeops.c
|
||||
+++ b/src/afs/LINUX/osi_vnodeops.c
|
||||
@@ -2215,7 +2215,11 @@
|
||||
static int
|
||||
mapping_read_page(struct address_space *mapping, struct page *page)
|
||||
{
|
||||
+#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
|
||||
+ return mapping->a_ops->read_folio(NULL, page_folio(page));
|
||||
+#else
|
||||
return mapping->a_ops->readpage(NULL, page);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Populate a page by filling it from the cache file pointed at by cachefp
|
||||
@@ -2326,8 +2330,13 @@
|
||||
static int inline
|
||||
file_can_read_pages(struct file *fp)
|
||||
{
|
||||
+#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
|
||||
+ if (fp->f_dentry->d_inode->i_mapping->a_ops->read_folio != NULL)
|
||||
+ return 1;
|
||||
+#else
|
||||
if (fp->f_dentry->d_inode->i_mapping->a_ops->readpage != NULL)
|
||||
return 1;
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2848,6 +2857,16 @@
|
||||
|
||||
return code;
|
||||
}
|
||||
+
|
||||
+#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
|
||||
+static int
|
||||
+afs_linux_read_folio(struct file *fp, struct folio *folio)
|
||||
+{
|
||||
+ struct page *pp = &folio->page;
|
||||
+
|
||||
+ return afs_linux_readpage(fp, pp);
|
||||
+}
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Updates the adc and acacheFp parameters
|
||||
@@ -3536,7 +3555,11 @@
|
||||
};
|
||||
|
||||
static struct address_space_operations afs_file_aops = {
|
||||
+#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
|
||||
+ .read_folio = afs_linux_read_folio,
|
||||
+#else
|
||||
.readpage = afs_linux_readpage,
|
||||
+#endif
|
||||
#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READAHEAD)
|
||||
.readahead = afs_linux_readahead,
|
||||
#else
|
||||
@@ -3609,9 +3632,22 @@
|
||||
unlock_page(page);
|
||||
return code;
|
||||
}
|
||||
+#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
|
||||
+static int
|
||||
+afs_symlink_filler_folio(struct file *file, struct folio *folio)
|
||||
+{
|
||||
+ struct page *page = &folio->page;
|
||||
+ return afs_symlink_filler(file, page);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
|
||||
static struct address_space_operations afs_symlink_aops = {
|
||||
+#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_READ_FOLIO)
|
||||
+ .read_folio = afs_symlink_filler_folio
|
||||
+#else
|
||||
.readpage = afs_symlink_filler
|
||||
+#endif
|
||||
};
|
||||
#endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */
|
||||
|
||||
diff --git a/src/cf/linux-kernel-struct.m4 b/src/cf/linux-kernel-struct.m4
|
||||
index 597289b..3d4b10b 100644
|
||||
--- a/src/cf/linux-kernel-struct.m4
|
||||
+++ b/src/cf/linux-kernel-struct.m4
|
||||
@@ -7,6 +7,8 @@
|
||||
AC_CHECK_LINUX_STRUCT([address_space_operations], [dirty_folio], [fs.h])
|
||||
dnl linux 5.18 replaced readpages with readahead (introduced in 5.8)
|
||||
AC_CHECK_LINUX_STRUCT([address_space_operations], [readahead], [fs.h])
|
||||
+dnl linux 5.18 replaced readpage with read_folio
|
||||
+AC_CHECK_LINUX_STRUCT([address_space_operations], [read_folio], [fs.h])
|
||||
AC_CHECK_LINUX_STRUCT([backing_dev_info], [name],
|
||||
[backing-dev.h])
|
||||
AC_CHECK_LINUX_STRUCT([cred], [session_keyring], [cred.h])
|
@ -1,15 +1,14 @@
|
||||
User-Visible OpenAFS Changes
|
||||
|
||||
OpenAFS 1.8.8.2~rc1
|
||||
OpenAFS 1.8.8.2~rc2
|
||||
|
||||
Linux clients
|
||||
|
||||
* Support mainline kernels 5.17 and likely 5.18
|
||||
* Support mainline kernels 5.17, 5.18 and 5.19
|
||||
* Support for gcc-12, clang-14
|
||||
|
||||
Maybe others
|
||||
|
||||
This is an intermediate package based on the git-branch
|
||||
stable-1_8_x with additional patches
|
||||
to fill the need of supporting Linux-5.18
|
||||
|
||||
to fill the need of supporting Linux-5.19
|
||||
|
99
cc8edf7.diff
Normal file
99
cc8edf7.diff
Normal file
@ -0,0 +1,99 @@
|
||||
From cc8edf7f9b75a2114ef6c7f003456b5515cbaaf5 Mon Sep 17 00:00:00 2001
|
||||
From: Cheyenne Wills <cwills@sinenomine.net>
|
||||
Date: Tue, 05 Jul 2022 10:28:10 -0600
|
||||
Subject: [PATCH] Linux: Introduce file mapping readpage helpers
|
||||
|
||||
Create a helper function that determines if a file's
|
||||
i_mapping->a_ops->readpage
|
||||
is NULL.
|
||||
|
||||
Create a helper function that calls a file's
|
||||
i_mapping->a_ops->readpage
|
||||
|
||||
There are no functional changes with this commit.
|
||||
|
||||
Note: This commit isolates references to 'readpage' so that future
|
||||
commits can change the name in a more straight forward manner.
|
||||
|
||||
Reviewed-on: https://gerrit.openafs.org/15039
|
||||
Tested-by: BuildBot <buildbot@rampaginggeek.com>
|
||||
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
|
||||
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
|
||||
(cherry picked from commit a81f7300f08d6e515adbde4bce4b72a3102b60f9)
|
||||
|
||||
Change-Id: I9268fd2622ecd48ad6971a8faaeefef8128f4024
|
||||
---
|
||||
|
||||
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
|
||||
index 5411863..b834a40 100644
|
||||
--- a/src/afs/LINUX/osi_vnodeops.c
|
||||
+++ b/src/afs/LINUX/osi_vnodeops.c
|
||||
@@ -2206,6 +2206,18 @@
|
||||
|
||||
#endif /* USABLE_KERNEL_PAGE_SYMLINK_CACHE */
|
||||
|
||||
+/*
|
||||
+ * Call the mapping function that reads data for a given page.
|
||||
+ * Note: When we return, it is expected that the page is unlocked. It is the
|
||||
+ * responsibility of the called function (e.g. ->readpage) to unlock the given
|
||||
+ * page, even when an error occurs.
|
||||
+ */
|
||||
+static int
|
||||
+mapping_read_page(struct address_space *mapping, struct page *page)
|
||||
+{
|
||||
+ return mapping->a_ops->readpage(NULL, page);
|
||||
+}
|
||||
+
|
||||
/* 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
|
||||
@@ -2272,9 +2284,9 @@
|
||||
|
||||
if (!PageUptodate(cachepage)) {
|
||||
ClearPageError(cachepage);
|
||||
- /* Note that ->readpage always handles unlocking the given page, even
|
||||
- * when an error is returned. */
|
||||
- code = cachemapping->a_ops->readpage(NULL, cachepage);
|
||||
+ /* Note that mapping_read_page always handles unlocking the given page,
|
||||
+ * even when an error is returned. */
|
||||
+ code = mapping_read_page(cachemapping, cachepage);
|
||||
if (!code && !task) {
|
||||
wait_on_page_locked(cachepage);
|
||||
}
|
||||
@@ -2306,6 +2318,17 @@
|
||||
put_page(cachepage);
|
||||
|
||||
return code;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * Return true if the file has a mapping that can read pages
|
||||
+ */
|
||||
+static int inline
|
||||
+file_can_read_pages(struct file *fp)
|
||||
+{
|
||||
+ if (fp->f_dentry->d_inode->i_mapping->a_ops->readpage != NULL)
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static int inline
|
||||
@@ -2403,7 +2426,8 @@
|
||||
AFS_GLOCK();
|
||||
goto out;
|
||||
}
|
||||
- if (!cacheFp->f_dentry->d_inode->i_mapping->a_ops->readpage) {
|
||||
+
|
||||
+ if (!file_can_read_pages(cacheFp)) {
|
||||
cachefs_noreadpage = 1;
|
||||
AFS_GLOCK();
|
||||
goto out;
|
||||
@@ -2871,7 +2895,7 @@
|
||||
code = -1;
|
||||
goto out;
|
||||
}
|
||||
- if (cacheFp->f_dentry->d_inode->i_mapping->a_ops->readpage == NULL) {
|
||||
+ if (!file_can_read_pages(cacheFp)) {
|
||||
cachefs_noreadpage = 1;
|
||||
/* No mapping function */
|
||||
code = -1;
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cadd1ae737ccead61f2353a791dfd2d319c397b3552aef7fbf57b9ce6dafa879
|
||||
size 3835423
|
||||
oid sha256:64b6816f6019dc371631893d67398a9a1d59f83d15f236504376d441a022df07
|
||||
size 3374112
|
||||
|
@ -1 +1 @@
|
||||
3206e88b7921851f627f0ec26103ab89 openafs-stable-1_8_x-doc.tar.bz2
|
||||
b39c1f237fddfc696b04f02185cfffda openafs-stable-1_8_x-doc.tar.bz2
|
||||
|
@ -1 +1 @@
|
||||
cadd1ae737ccead61f2353a791dfd2d319c397b3552aef7fbf57b9ce6dafa879 openafs-stable-1_8_x-doc.tar.bz2
|
||||
64b6816f6019dc371631893d67398a9a1d59f83d15f236504376d441a022df07 openafs-stable-1_8_x-doc.tar.bz2
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:47b9ac236f5589ed48a6eee194b42ea4254aa6d4e122aceae5b9fd802a2adaf6
|
||||
size 113262625
|
||||
oid sha256:3e9ba0783deef51d7838ec847c2cfe6d00967b0ce50104ac0dcdf9d8e39b67c4
|
||||
size 14570039
|
||||
|
@ -1 +1 @@
|
||||
cce4f045f9c7ee1af8f101d25325c52a openafs-stable-1_8_x-src.tar.bz2
|
||||
5ed303e2b2ade613991395b34dbbd2f8 openafs-stable-1_8_x-src.tar.bz2
|
||||
|
@ -1 +1 @@
|
||||
47b9ac236f5589ed48a6eee194b42ea4254aa6d4e122aceae5b9fd802a2adaf6 openafs-stable-1_8_x-src.tar.bz2
|
||||
3e9ba0783deef51d7838ec847c2cfe6d00967b0ce50104ac0dcdf9d8e39b67c4 openafs-stable-1_8_x-src.tar.bz2
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 16 09:54:58 UTC 2022 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
|
||||
|
||||
- update to current of upstream-branch openafs-stable-1_8_x
|
||||
- apply patches for 15.9:
|
||||
* 05b722d.diff 6348262.diff cc8edf7.diff
|
||||
- remove patches now in openafs-stable-1_8_x
|
||||
* fix_gcc_12_linux_5.18.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 22 16:13:18 UTC 2022 - Christof Hanke <christof.hanke@mpcdf.mpg.de>
|
||||
|
||||
|
@ -106,7 +106,9 @@ 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)
|
||||
Patch1: fix_gcc_12_linux_5.18.diff
|
||||
Patch1: cc8edf7.diff
|
||||
Patch2: 05b722d.diff
|
||||
Patch3: 6348262.diff
|
||||
# PATCH-FIX-UPSTREAM make configure detect ncurses 6 correctly
|
||||
Patch4: 4cf7a9a.diff
|
||||
|
||||
@ -319,6 +321,8 @@ done
|
||||
|
||||
%setup -q -n openafs-%{upstream_version} -T -b 0 -b 1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
./regen.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user