Files
linux/include/linux
David Howells 2bfc668509 splice, net: Add a splice_eof op to file-ops and socket-ops
Add an optional method, ->splice_eof(), to allow splice to indicate the
premature termination of a splice to struct file_operations and struct
proto_ops.

This is called if sendfile() or splice() encounters all of the following
conditions inside splice_direct_to_actor():

 (1) the user did not set SPLICE_F_MORE (splice only), and

 (2) an EOF condition occurred (->splice_read() returned 0), and

 (3) we haven't read enough to fulfill the request (ie. len > 0 still), and

 (4) we have already spliced at least one byte.

A further patch will modify the behaviour of SPLICE_F_MORE to always be
passed to the actor if either the user set it or we haven't yet read
sufficient data to fulfill the request.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/CAHk-=wh=V579PDYvkpnTobCLGczbgxpMgGmmhqiTyE34Cpi5Gg@mail.gmail.com/
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
cc: Jens Axboe <axboe@kernel.dk>
cc: Christoph Hellwig <hch@lst.de>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: Matthew Wilcox <willy@infradead.org>
cc: Jan Kara <jack@suse.cz>
cc: Jeff Layton <jlayton@kernel.org>
cc: David Hildenbrand <david@redhat.com>
cc: Christian Brauner <brauner@kernel.org>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Boris Pismenny <borisp@nvidia.com>
cc: John Fastabend <john.fastabend@gmail.com>
cc: linux-mm@kvack.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-06-08 19:40:30 -07:00
..
2023-01-16 09:26:05 +01:00
2022-11-04 12:59:25 +02:00
2023-03-29 12:26:32 +02:00
2023-03-06 12:33:02 +02:00
2023-04-21 14:37:03 +01:00
2023-01-19 14:46:25 +01:00
2022-09-26 12:19:12 -07:00
2023-05-20 05:38:01 -06:00
2023-06-01 21:40:10 -07:00
2023-02-03 08:20:55 -07:00
2022-09-26 19:46:29 -07:00
2022-09-26 10:13:13 -07:00
2022-09-26 10:13:13 -07:00
2022-09-15 09:32:06 -07:00
2023-01-13 11:48:15 +01:00
2023-03-05 10:49:37 -08:00
2023-05-25 09:26:19 +02:00
2023-03-23 16:02:27 -10:00
2023-04-17 18:01:23 +02:00
2023-04-20 18:20:04 +08:00
2023-01-19 16:07:40 +01:00
2023-03-06 15:49:07 -06:00
2023-01-29 15:18:33 -07:00
2023-01-29 15:18:33 -07:00
2023-05-25 09:26:19 +02:00
2023-02-06 19:06:58 +01:00
2023-01-19 09:24:28 +01:00
2023-03-29 16:00:23 +02:00
2023-01-11 06:52:43 -05:00
2023-03-19 10:02:04 -07:00
2023-03-06 12:33:02 +02:00
2022-09-01 18:04:43 +02:00
2022-09-08 12:59:00 -06:00
2022-09-26 13:31:20 +02:00
2022-12-11 19:30:20 -08:00
2022-09-01 18:08:44 +02:00
2023-02-13 10:11:20 +02:00
2022-10-03 14:03:19 -07:00
2023-03-07 22:04:45 +05:30
2023-01-19 09:24:30 +01:00
2023-03-29 12:26:32 +02:00
2023-05-24 18:08:49 +02:00
2023-03-15 14:58:52 +01:00
2022-10-03 17:34:32 -07:00
2022-09-26 19:46:27 -07:00
2023-01-16 09:26:06 +01:00
2023-04-03 11:16:56 +02:00
2023-01-04 14:44:13 -07:00
2023-03-06 09:57:07 +01:00
2022-12-20 03:13:45 +01:00
2022-10-23 18:06:54 -04:00
2023-03-17 15:00:40 +01:00
2023-01-19 15:01:19 +01:00
2023-05-18 19:52:31 -07:00
2023-01-18 17:12:47 -08:00
2022-09-07 12:42:25 +01:00
2022-09-29 15:20:29 +02:00
2022-09-22 16:12:34 +02:00
2023-03-16 13:08:39 -07:00
2022-08-28 16:52:28 +01:00
2023-03-23 17:25:46 +01:00
2023-03-29 08:19:38 +01:00
2023-04-05 20:03:01 -07:00
2023-04-21 03:02:34 -04:00
2023-03-06 09:57:11 +01:00
2022-10-24 12:12:32 -07:00