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

James Simmons <[email protected]>
Newsgroups org.lustre.lists.lustre-devel
Message-ID <[email protected]>
From: Shaun Tancheff <[email protected]>

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 <[email protected]>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48928
Reviewed-by: James Simmons <[email protected]>
Reviewed-by: Andreas Dilger <[email protected]>
Reviewed-by: Oleg Drokin <[email protected]>
Signed-off-by: James Simmons <[email protected]>
---
 fs/lustre/llite/file.c | 3 +++
 1 file changed, 3 insertions(+)

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,
-- 
1.8.3.1

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.