summaryrefslogtreecommitdiffstats
path: root/include/linux/uio.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-04-04 12:15:19 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:39:44 -0400
commitb42b15fdad3ebb790250041d1517acebb9bd56d9 (patch)
treedd273391e1cf117a0e5356c3b84aac6c5549deae /include/linux/uio.h
parent4908b822b300d2d7ad0341203181cfbd8a91092a (diff)
downloadop-kernel-dev-b42b15fdad3ebb790250041d1517acebb9bd56d9.zip
op-kernel-dev-b42b15fdad3ebb790250041d1517acebb9bd56d9.tar.gz
lustre: get rid of messing with iovecs
* switch to ->read_iter/->write_iter * keep a pointer to iov_iter instead of iov/nr_segs * do not modify iovecs; use iov_iter_truncate()/iov_iter_advance() and a new primitive - iov_iter_reexpand() (expand previously truncated iterator) istead. * (racy) check for lustre VMAs intersecting with iovecs kept for now as for_each_iov() loop. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/uio.h')
-rw-r--r--include/linux/uio.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 6601235..e8a109a 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -90,6 +90,15 @@ static inline void iov_iter_truncate(struct iov_iter *i, size_t count)
i->count = count;
}
+/*
+ * reexpand a previously truncated iterator; count must be no more than how much
+ * we had shrunk it.
+ */
+static inline void iov_iter_reexpand(struct iov_iter *i, size_t count)
+{
+ i->count = count;
+}
+
int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len);
int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len);
OpenPOWER on IntegriCloud