diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 23:48:33 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 23:48:33 (GMT) |
commit | 66dc830d14a222c9214a8557e9feb1e4a67a3857 (patch) | |
tree | d5bd699150fecfe5b2ebfddd9db651389480937d /include | |
parent | 05016b0f0a9d900e976db7f50a7761c0aefe5a1c (diff) | |
parent | dbe4e192a234cd6133d86fffb965d0f032c12ccc (diff) | |
download | linux-66dc830d14a222c9214a8557e9feb1e4a67a3857.tar.xz |
Merge branch 'iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull iov_iter updates from Al Viro:
"More iov_iter work - missing counterpart of iov_iter_init() for
bvec-backed ones and vfs_read_iter()/vfs_write_iter() - wrappers for
sync calls of ->read_iter()/->write_iter()"
* 'iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fs: add vfs_iter_{read,write} helpers
new helper: iov_iter_bvec()
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 3 | ||||
-rw-r--r-- | include/linux/uio.h | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index a9250b2..0b5b146 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2548,6 +2548,9 @@ extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t l extern ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); extern ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); +ssize_t vfs_iter_read(struct file *file, struct iov_iter *iter, loff_t *ppos); +ssize_t vfs_iter_write(struct file *file, struct iov_iter *iter, loff_t *ppos); + /* fs/block_dev.c */ extern ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to); extern ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from); diff --git a/include/linux/uio.h b/include/linux/uio.h index 3e0cb4e..07a0226 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -88,7 +88,9 @@ size_t iov_iter_zero(size_t bytes, struct iov_iter *); unsigned long iov_iter_alignment(const struct iov_iter *i); void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, unsigned long nr_segs, size_t count); -void iov_iter_kvec(struct iov_iter *i, int direction, const struct kvec *iov, +void iov_iter_kvec(struct iov_iter *i, int direction, const struct kvec *kvec, + unsigned long nr_segs, size_t count); +void iov_iter_bvec(struct iov_iter *i, int direction, const struct bio_vec *bvec, unsigned long nr_segs, size_t count); ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, size_t maxsize, unsigned maxpages, size_t *start); |