diff options
author | Jens Axboe <axboe@suse.de> | 2006-04-11 15:51:17 +0200 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-04-11 15:51:17 +0200 |
commit | 70524490ee2ea1bbf6cee6c106597b3ac25a3fc2 (patch) | |
tree | c61dd500035bc3e0dea364777de1b7a58b41a75c /include/linux | |
parent | cbb7e577e732f576b9f399bc2600bdc0626c68dc (diff) | |
download | op-kernel-dev-70524490ee2ea1bbf6cee6c106597b3ac25a3fc2.zip op-kernel-dev-70524490ee2ea1bbf6cee6c106597b3ac25a3fc2.tar.gz |
[PATCH] splice: add support for sys_tee()
Basically an in-kernel implementation of tee, which uses splice and the
pipe buffers as an intelligent way to pass data around by reference.
Where the user space tee consumes the input and produces a stdout and
file output, this syscall merely duplicates the data inside a pipe to
another pipe. No data is copied, the output just grabs a reference to the
input pipe data.
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pipe_fs_i.h | 1 | ||||
-rw-r--r-- | include/linux/syscalls.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index 123a7c2..ef7f33c 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h @@ -21,6 +21,7 @@ struct pipe_buf_operations { void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); void (*release)(struct pipe_inode_info *, struct pipe_buffer *); int (*steal)(struct pipe_inode_info *, struct pipe_buffer *); + void (*get)(struct pipe_inode_info *, struct pipe_buffer *); }; struct pipe_inode_info { diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index f001bad..d3ebc0e 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -574,6 +574,8 @@ asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, int fd_out, loff_t __user *off_out, size_t len, unsigned int flags); +asmlinkage long sys_tee(int fdin, int fdout, size_t len, unsigned int flags); + asmlinkage long sys_sync_file_range(int fd, loff_t offset, loff_t nbytes, unsigned int flags); |