mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] splice: add direct fd <-> fd splicing support
It's more efficient for sendfile() emulation. Basically we cache an internal private pipe and just use that as the intermediate area for pages. Direct splicing is not available from sys_splice(), it is only meant to be used for sendfile() emulation. Additional patch from Ingo Molnar to avoid the PIPE_BUFFERS loop at exit for the normal fast path. Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
529565dcb1
commit
b92ce55893
6 changed files with 150 additions and 21 deletions
|
@ -1613,6 +1613,8 @@ extern void do_generic_mapping_read(struct address_space *mapping,
|
|||
loff_t *, read_descriptor_t *, read_actor_t);
|
||||
extern ssize_t generic_file_splice_read(struct file *, struct pipe_inode_info *, size_t, unsigned int);
|
||||
extern ssize_t generic_file_splice_write(struct pipe_inode_info *, struct file *, size_t, unsigned int);
|
||||
extern long do_splice_direct(struct file *in, struct file *out,
|
||||
size_t len, unsigned int flags);
|
||||
extern void
|
||||
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
|
||||
extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue