mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-08 15:33:47 +00:00
[PATCH] splice: rearrange moving to/from pipe helpers
We need these for people writing their own ->splice_read/write hooks. Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
912d35f867
commit
00522fb41a
2 changed files with 28 additions and 24 deletions
|
@ -61,4 +61,21 @@ void __free_pipe_info(struct pipe_inode_info *);
|
|||
/* from/to, of course */
|
||||
#define SPLICE_F_MORE (0x04) /* expect more data */
|
||||
|
||||
/*
|
||||
* Passed to the actors
|
||||
*/
|
||||
struct splice_desc {
|
||||
unsigned int len, total_len; /* current and remaining length */
|
||||
unsigned int flags; /* splice flags */
|
||||
struct file *file; /* file to read/write */
|
||||
loff_t pos; /* file position */
|
||||
};
|
||||
|
||||
typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *,
|
||||
struct splice_desc *);
|
||||
|
||||
extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *,
|
||||
loff_t *, size_t, unsigned int,
|
||||
splice_actor *);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue