aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-03-30 08:16:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-30 15:28:18 -0500
commit5abc97aa25b2c41413b3a520faee83f2282d9f18 (patch)
tree4ba13ae0e91f15d02986df7cdca5e9455212d7d4 /include
parent5274f052e7b3dbd81935772eb551dfd0325dfa9d (diff)
[PATCH] splice: add support for SPLICE_F_MOVE flag
This enables the caller to migrate pages from one address space page cache to another. In buzz word marketing, you can do zero-copy file copies! Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/pipe_fs_i.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h
index b12e59c75752..75c7f55023ab 100644
--- a/include/linux/pipe_fs_i.h
+++ b/include/linux/pipe_fs_i.h
@@ -9,6 +9,7 @@ struct pipe_buffer {
9 struct page *page; 9 struct page *page;
10 unsigned int offset, len; 10 unsigned int offset, len;
11 struct pipe_buf_operations *ops; 11 struct pipe_buf_operations *ops;
12 unsigned int stolen;
12}; 13};
13 14
14struct pipe_buf_operations { 15struct pipe_buf_operations {
@@ -16,6 +17,7 @@ struct pipe_buf_operations {
16 void * (*map)(struct file *, struct pipe_inode_info *, struct pipe_buffer *); 17 void * (*map)(struct file *, struct pipe_inode_info *, struct pipe_buffer *);
17 void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *); 18 void (*unmap)(struct pipe_inode_info *, struct pipe_buffer *);
18 void (*release)(struct pipe_inode_info *, struct pipe_buffer *); 19 void (*release)(struct pipe_inode_info *, struct pipe_buffer *);
20 int (*steal)(struct pipe_inode_info *, struct pipe_buffer *);
19}; 21};
20 22
21struct pipe_inode_info { 23struct pipe_inode_info {
@@ -53,4 +55,10 @@ void pipe_wait(struct inode * inode);
53struct inode* pipe_new(struct inode* inode); 55struct inode* pipe_new(struct inode* inode);
54void free_pipe_info(struct inode* inode); 56void free_pipe_info(struct inode* inode);
55 57
58/*
59 * splice is tied to pipes as a transport (at least for now), so we'll just
60 * add the splice flags here.
61 */
62#define SPLICE_F_MOVE (0x01) /* move pages instead of copying */
63
56#endif 64#endif