mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 22:12:16 +00:00
splice: abstract out actor data
For direct splicing (or private splicing), the output may not be a file. So abstract out the handling into a specified actor function and put the data in the splice_desc structure earlier, so we can build on top of that. This is the first step in better splice handling for drivers, and also for implementing vmsplice _to_ user memory. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
71780f59e1
commit
c66ab6fa70
3 changed files with 83 additions and 35 deletions
|
@ -94,13 +94,15 @@ struct splice_desc {
|
|||
|
||||
typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *,
|
||||
struct splice_desc *);
|
||||
typedef int (splice_direct_actor)(struct pipe_inode_info *,
|
||||
struct splice_desc *);
|
||||
|
||||
extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *,
|
||||
loff_t *, size_t, unsigned int,
|
||||
splice_actor *);
|
||||
|
||||
extern ssize_t __splice_from_pipe(struct pipe_inode_info *, struct file *,
|
||||
loff_t *, size_t, unsigned int,
|
||||
splice_actor *);
|
||||
extern ssize_t __splice_from_pipe(struct pipe_inode_info *,
|
||||
struct splice_desc *, splice_actor *);
|
||||
extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,
|
||||
splice_direct_actor *);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue