diff mbox series

[04/22] lustre: llite: Explicitly support .splice_write

Message ID 1668953828-10909-5-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: backport OpenSFS work as of Nov 20, 2022 | expand

Commit Message

James Simmons Nov. 20, 2022, 2:16 p.m. UTC
From: Shaun Tancheff <shaun.tancheff@hpe.com>

Linux commit v5.9-rc1-6-g36e2c7421f02
  fs: don't allow splice read/write without explicit ops

Lustre supports splice_write and previously provide handlers
for splice_read.
Explicitly use iter_file_splice_write, if it exists.

HPE-bug-id: LUS-11259
WC-bug-id: https://jira.whamcloud.com/browse/LU-16258
Lustre-commit: c619b6d6a54235cc0 ("LU-16258 llite: Explicitly support .splice_write")
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48928
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 fs/lustre/llite/file.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/fs/lustre/llite/file.c b/fs/lustre/llite/file.c
index 350d5df..34a449e 100644
--- a/fs/lustre/llite/file.c
+++ b/fs/lustre/llite/file.c
@@ -5564,6 +5564,7 @@  int ll_inode_permission(struct inode *inode, int mask)
 	.mmap			= ll_file_mmap,
 	.llseek			= ll_file_seek,
 	.splice_read		= generic_file_splice_read,
+	.splice_write		= iter_file_splice_write,
 	.fsync			= ll_fsync,
 	.flush			= ll_flush,
 	.fallocate		= ll_fallocate,
@@ -5578,6 +5579,7 @@  int ll_inode_permission(struct inode *inode, int mask)
 	.mmap			= ll_file_mmap,
 	.llseek			= ll_file_seek,
 	.splice_read		= generic_file_splice_read,
+	.splice_write		= iter_file_splice_write,
 	.fsync			= ll_fsync,
 	.flush			= ll_flush,
 	.flock			= ll_file_flock,
@@ -5595,6 +5597,7 @@  int ll_inode_permission(struct inode *inode, int mask)
 	.mmap			= ll_file_mmap,
 	.llseek			= ll_file_seek,
 	.splice_read		= generic_file_splice_read,
+	.splice_write		= iter_file_splice_write,
 	.fsync			= ll_fsync,
 	.flush			= ll_flush,
 	.flock			= ll_file_noflock,