From 381f4543b7502f5919b94ca292405ebe4dffdc9e Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 29 Nov 2023 10:25:16 -0800 Subject: [PATCH] Use iter based read/write to support splice and thus sendfile(). The iter based read/write calls can support splice in el9 if we hook up these calls, otherwise splice will stop working. ->write() similar to: v3.15-rc4-330-g8d0207652cbe. ->read() to generic implementation. Signed-off-by: Auke Kok --- kmod/src/data.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kmod/src/data.c b/kmod/src/data.c index 8a1c65e0..eac86c5c 100644 --- a/kmod/src/data.c +++ b/kmod/src/data.c @@ -1912,6 +1912,8 @@ const struct file_operations scoutfs_file_fops = { #else .read_iter = scoutfs_file_read_iter, .write_iter = scoutfs_file_write_iter, + .splice_read = generic_file_splice_read, + .splice_write = iter_file_splice_write, #endif .unlocked_ioctl = scoutfs_ioctl, .fsync = scoutfs_file_fsync,