summaryrefslogtreecommitdiff
path: root/include/linux/splice.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-09-22 16:33:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-10-05 18:23:36 -0400
commit241699cd72a8489c9446ae3910ddd243e9b9061b (patch)
treeefcd8d62f5788ab843cd3457cf2e85f3be7b5296 /include/linux/splice.h
parentd82718e348fee15dbce8f578ff2588982b7cc7ca (diff)
new iov_iter flavour: pipe-backed
iov_iter variant for passing data into pipe. copy_to_iter() copies data into page(s) it has allocated and stuffs them into the pipe; copy_page_to_iter() stuffs there a reference to the page given to it. Both will try to coalesce if possible. iov_iter_zero() is similar to copy_to_iter(); iov_iter_get_pages() and friends will do as copy_to_iter() would have and return the pages where the data would've been copied. iov_iter_advance() will truncate everything past the spot it has advanced to. New primitive: iov_iter_pipe(), used for initializing those. pipe should be locked all along. Running out of space acts as fault would for iovec-backed ones; in other words, giving it to ->read_iter() may result in short read if the pipe overflows, or -EFAULT if it happens with nothing copied there. In other words, ->read_iter() on those acts pretty much like ->splice_read(). Moreover, all generic_file_splice_read() users, as well as many other ->splice_read() instances can be switched to that scheme - that'll happen in the next commit. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/splice.h')
-rw-r--r--include/linux/splice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 58b300f37534..00a21166e268 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -85,4 +85,5 @@ extern void splice_shrink_spd(struct splice_pipe_desc *);
extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
+extern const struct pipe_buf_operations default_pipe_buf_ops;
#endif