forked from pool/openafs
709654e78b
- apply upstream-patches for kernel 6.5: * 63801cf.diff * d15c7ab.diff * fef2457.diff * 538f450.diff * 474750a.diff OBS-URL: https://build.opensuse.org/request/show/1114718 OBS-URL: https://build.opensuse.org/package/show/filesystems/openafs?expand=0&rev=111
62 lines
2.3 KiB
Diff
62 lines
2.3 KiB
Diff
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,
|