diff options
author | Jens Axboe <axboe@suse.de> | 2006-04-26 08:39:29 -0400 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2006-04-26 08:39:29 -0400 |
commit | 00522fb41a2a9bf0f98a007c0e2b516a3873148c (patch) | |
tree | 18bcbfb598f0ad0a4745aaee25dab6dccc6449a1 /include/linux/pipe_fs_i.h | |
parent | 912d35f86781e64d73be1ef358f703c08905ac37 (diff) |
[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>
Diffstat (limited to 'include/linux/pipe_fs_i.h')
-rw-r--r-- | include/linux/pipe_fs_i.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/pipe_fs_i.h b/include/linux/pipe_fs_i.h index ef7f33c0be19..0008d4bd4059 100644 --- a/include/linux/pipe_fs_i.h +++ b/include/linux/pipe_fs_i.h | |||
@@ -61,4 +61,21 @@ void __free_pipe_info(struct pipe_inode_info *); | |||
61 | /* from/to, of course */ | 61 | /* from/to, of course */ |
62 | #define SPLICE_F_MORE (0x04) /* expect more data */ | 62 | #define SPLICE_F_MORE (0x04) /* expect more data */ |
63 | 63 | ||
64 | /* | ||
65 | * Passed to the actors | ||
66 | */ | ||
67 | struct splice_desc { | ||
68 | unsigned int len, total_len; /* current and remaining length */ | ||
69 | unsigned int flags; /* splice flags */ | ||
70 | struct file *file; /* file to read/write */ | ||
71 | loff_t pos; /* file position */ | ||
72 | }; | ||
73 | |||
74 | typedef int (splice_actor)(struct pipe_inode_info *, struct pipe_buffer *, | ||
75 | struct splice_desc *); | ||
76 | |||
77 | extern ssize_t splice_from_pipe(struct pipe_inode_info *, struct file *, | ||
78 | loff_t *, size_t, unsigned int, | ||
79 | splice_actor *); | ||
80 | |||
64 | #endif | 81 | #endif |